websocket - PHP socket_read only reading 8192 bytes of data -
websocket - PHP socket_read only reading 8192 bytes of data -
i have 2 parts of code below. 1 sending info , 1 reading out of socket whatever set 3rd parameter in socket_read read 8192 bytes of info when total length of info 14329 bytes , i've set buffer 102400 bytes.
//sending $this->ip = "10.0.6.65"; $this->port = 10003; $fp = fsockopen($this->ip, $this->port, $errno = '', $errstr = '', 120); fputs($fp, $_message, strlen($_message)); //reading $socket=socket_create(af_inet,sock_stream,0); socket_bind($socket,$config['host'],$config['port']); socket_listen($socket, $config['max_client']; $comsocket = array('socket'=>$socket); $comsocket[$i]['socket'] = socket_accept($socket); do{ $this->socketinput .= socket_read($comsocket[$i]['socket'], 102400); if ($this->socketinput == '') { socket_close($comsocket[$i]['socket']); break; } }while (true);
php websocket
Comments
Post a Comment