In what way do you want read() to return 0 earlier? If you want it do do that the first time there's no data available, then you need to set the socket to non-blocking. Note that in that case you'll need some extra logic to determine when and how you have read enough data, and you'll need to add a select() call to wait for motre data.
Dave.
In reply to Re: Sockets + Read
by dave_the_m
in thread Sockets + Read
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |