Anyone using PHP for TCP/UDP socket communications?
I'm trying to write an interface engine to process data from a specific protocol feed.
I've been pretty successful in short time but I'm using the built-in PHP function fread to read data from the TCP socket. I set the socket timeout for 5 seconds, read some data and then go off and do some processing and then loop back around and try to read more data, rinse and repeat.
The problem is that fread stops reading the socket when it's reached it max buffer length (defaults to 8K).
I'm guessing I need to use socket_recv or something along those lines.