RE: [PHP] How to get input from socket client

2010-05-21 Thread Bob McConnell
From: Ryan Sun > Thanks for your reply You are welcome. >> The other problem has to do with thinking an fread() will always give >> you everything you sent in an fwrite() > Interestingly, I use 'telnet 127.0.0.1 1037' for testing later(on > windows) and everything works, the php server got the

Re: [PHP] How to get input from socket client

2010-05-20 Thread Ryan Sun
Thanks for your reply > First, I don't think feof() will do what you think it does. I > wouldn't expect it to show up until after the other end has actually > closed the connection. I found unread_bytes in stream_get_meta_data should be more reliable > TCP is a stream protocol, there > are no gu

RE: [PHP] How to get input from socket client

2010-05-10 Thread Bob McConnell
From: Ryan Sun > Stream and networking programming seems like a rock on the way to > ZCE for most people, so I'm learning some socket examples before I sit > in the room for exam. > Here is the script for server > server&client hangs after output and time out later. > > Can any1 point out wh