note 79045 added to function.socket-recvfrom

From: Date: Thu, 08 Nov 2007 05:56:07 +0000
Subject: note 79045 added to function.socket-recvfrom
Groups: php.notes 
Request: Send a blank email to php-notes+get-132100@lists.php.net to get a copy of this message
I'm confused about the rerturn value of socket_recvfrom(), it said -1 when failed, but when I call like this: if (($len = @socket_recvfrom($sock, $result, 32, 0, $ip, $port)) == -1) { if ($this->_debug) { echo "socket_read() failed: " . socket_strerror(socket_last_error()) . "\n"; } return false; } variable $len = false, when I change the buffer length from 32 to 4096, it becomes right. ---- Server IP: 69.147.83.197 Probable Submitter: 222.66.106.194 ---- Manual Page -- http://www.php.net/manual/en/function.socket-recvfrom.php Edit -- https://master.php.net/note/edit/79045 Del: integrated -- https://master.php.net/note/delete/79045/integrated Del: useless -- https://master.php.net/note/delete/79045/useless Del: bad code -- https://master.php.net/note/delete/79045/bad+code Del: spam -- https://master.php.net/note/delete/79045/spam Del: non-english -- https://master.php.net/note/delete/79045/non-english Del: in docs -- https://master.php.net/note/delete/79045/in+docs Del: other reasons-- https://master.php.net/note/delete/79045 Reject -- https://master.php.net/note/reject/79045 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#132100) next »