This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Server Daemon Closing Socket?

I'm passing back 1 from TCP server daemon callback, but the connection to host is dropping.

From SPRU524_pg:

"...the function can choose to close the socket if desired. The return code informs the daemon whether the socket has been closed (0) or is still open (1)."

Since I'm NOT closing the socket, I pass back 1 from my callback, but the connection to host is still dropping.  Is this correct behavior?  When the callback/daemon task terminates, is the connection terminated with the calling host if I pass back 1?

 

 

  • Guess I will answer my own question in hopes of saving the next guy/gal some aggrivation.

    I was trying to receive data through a socket on one task and send the data back through the same socket on a different task.

    This won't work if the file descriptor is being created in the receiving task - like fdOpenSession( TaskSelf() ) and you want to use the same socket in a another task.

    Yeah. That will ruin your day.

    So, I've decided to receive packets in on task and then open another socket to host to send results back.