until we uncovered the clients that didn't terminate their last line What?
They closed the socket before sending \r\n?
My code deals with that.
because you're using fixed-length packets, you avoid the actual problem that trapped me
No, not at all.
I thought that I explained clearly how to deal with an indeterminate length \r\n terminated packet.
What was not clear?
Obviously something was not.
It would help if you could ask the question in a different way.
Please look at: sysread. sysread() will return with a number of bytes read.
If the other side sends: "1234\r\n", just look at the end of the buffer to see if there is a line termination (last 2 bytes).
What's the problem?
I think that you can easily adapt my code to deal with your requirements.
In reply to Re^3: Socket descriptor passed across fork -- hanging
by Marshall
in thread Socket descriptor passed across fork -- hanging
by dd-b
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |