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 input from
> telnet client, so I assume there is something wrong in the php client,
> the fwrite statement...
What are the actual symptoms? Are you sure both ends are using the same
TCP transports a series of octets, or bytes. Again it is up to the
applications on both ends of the stream to agree on interpretation of
those octets, either separately or in sequence. For example, if integers
or floats are sent in a native format, but one end is little Endean
while the other is big Endean, there will be some differences in what
the two ends read from that stream. Likewise, if one end is expecting
ASCII, while the other is sending UTF-8, there may be the occasional
multi-byte value that gets scrambled.
On the other hand, I may be way out in left field.
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php