The Little Guy Posted November 1, 2009 Share Posted November 1, 2009 I don't get this... I am using socet_recv, and I don't understand why every time data is sent to the socket, it is unpredictable how much the socket will read... sometimes it reads the whole string, sometimes it reads half, sometime a quarter, and so on. Why does it read like this??? Am in shutting down/closing the socket too soon? $max_post_size = 10485760; socket_recv($client, $headers, $max_post_size, MSG_WAITALL); socket_getsockname($client, $ip); $document = new Document($headers); socket_write($client, $document->result()); socket_shutdown($client, 2); socket_close($client); I have a form with a textarea, input text filed, and a file field, I am sending all that, to the socket, so the socket is getting all the post data plus a binary string of an image (which i place in the file field, it is about a 66kb size image). any suggestions? Link to comment https://forums.phpfreaks.com/topic/179783-socket_recv-not-reading-all-the-data/ Share on other sites More sharing options...
The Little Guy Posted November 1, 2009 Author Share Posted November 1, 2009 any ideas? Link to comment https://forums.phpfreaks.com/topic/179783-socket_recv-not-reading-all-the-data/#findComment-948744 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.