You may want to look at a TCP server with IO::Select from the POE website and also read these 4 excellent examples on how to use POE. It's going to save you a lot of the standard network I/O headaches and you will have only to implement the buffering code to return only when you've read $data_length bytes. The last example is the way to go! :)
In reply to Re: send() + recv() on nonblocking tcp sockets
by salvix
in thread send() + recv() on nonblocking tcp sockets
by ph713
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |