hello all! i've been playing around with the socket extension that come with php 4.1.0 for windows finally :-) i found the official docs to be way outdated but managed to stumble over this nice document http://introverted.com/php-sockets.html, its also a little incorrect (some parameters are wrong and i suspect not everything is documented here either, anyway much better than the official docs).
ive managed to create a socket and open a connection to a server, right now im trying to figure out how to know how much data there is left for me to read, since the function socket_read($handle, $length) reads exactly $length bytes, and if there isnt so many bytes left to read, it waits until there are before finishing the function (in my case there never is). so im wondering if anyone have had time to play around with this extension and have any hints about how to figure out how much data there is left to read. also i saw the socket_recv() function that says in the docs on the url above it recieves "up to $length bytes", wich seems to be just what i need. but when i call it as those docs suggests: mixed socket_recv (int socket, int length, int socket_flags) i get a error about the function requires exactly 2 parameters and both must be resources, wich makes my head spin :-) anyway any help would be greatly appericiated! /Martin -- PHP Windows Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]