note 67837 added to function.stream-socket-server

From: Date: Wed, 05 Jul 2006 20:26:20 +0000
Subject: note 67837 added to function.stream-socket-server
Groups: php.notes 
Request: Send a blank email to php-notes+get-114415@lists.php.net to get a copy of this message
If you want a high speed socket server, use the low-level sockets instead (socket_create/bind/listen). The stream_socket_server version appears to have internal fixed 8k buffers that will overflow if you don't keep up by reading. This is a serious problem if you an application that reads the socket for messages and then, say, saves the result in a database. The delay while it is busy processing means you can't read the data in time unless you get involved in muti-threading. With the the low-level functions, the OS quietly buffers TCP/IP packets so there is no problem (tested on Windows XP Professional). ---- Server IP: 66.163.161.117 Probable Submitter: 81.193.137.42 ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.stream-socket-server.php Edit -- http://master.php.net/note/edit/67837 Del: integrated -- http://master.php.net/note/delete/67837/integrated Del: useless -- http://master.php.net/note/delete/67837/useless Del: bad code -- http://master.php.net/note/delete/67837/bad+code Del: spam -- http://master.php.net/note/delete/67837/spam Del: non-english -- http://master.php.net/note/delete/67837/non-english Del: in docs -- http://master.php.net/note/delete/67837/in+docs Del: other reasons-- http://master.php.net/note/delete/67837 Reject -- http://master.php.net/note/reject/67837 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#114415) next »