while working on a project I wanted to get general information about my clients (current fps, gpu memory etc.) by tcp request.
Whenever I trigger the tcp request which accesses a perform chop, the warning “cook dependency loop detected” shows up.
I attached a file with the most simple setup imaginable, where the warning occurs. How would I do this the right way?
Thanks! tcp dependency loop.toe (4.12 KB)
I’m not sure this cook dependency warning will actually affect your network. The reason the simple network you posted wasn’t sending a response back to the client was because you were referencing the rather than the value of the channel. The TCPIP DAT also require things to be sent as byte or strings.
So your callback looks something like this:
def receive(dat, rowIndex, message, bytes, peer):
if message.lower() == "debug":
dat.send( str(op('perform1')['fps'].eval()) )
return
This should send out the appropriate info even though you get the cook dependency warning.
If the receiving tcp/ip is a DAT set to Row/Callback Format ‘One Per Line’, then you need to send a trailing newline, otherwise bytes will accumulate quietly until that newline is received.
That is, instead send: str(op(‘perform1’)[‘fps’]) + ‘\n’
The cookloop should not be happening, and this will now be fixed.
Also, it will now error when you include any arguments in send() it does not expect (ie: not strings or bytes).