note 99956 added to function.socket-shutdown
| From: | recycling dot sp dot am at gmail dot com | Date: | Thu, 16 Sep 2010 16:09:06 +0000 |
| Subject: | note 99956 added to function.socket-shutdown | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-172657@lists.php.net to get a copy of this message | ||
Shutdown and SOL_TCP:
<?php
$a= socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
socket_shutdown($a, 2)
?>
PHP Warning: socket_shutdown(): unable to shutdown socket [107]: Transport endpoint is not
connected
Shutdown and SOL_UDP:
<?php
$a= socket_create(AF_INET, SOCK_STREAM, SOL_UDP);
socket_shutdown($a, 2)
?>
PHP Warning: socket_shutdown(): unable to shutdown socket [107]: Transport endpoint is not
connected
Conclusion: if you are not actually connected, shutdown will fails with socket_error = 107,
Transport endpoint is not connected. This is true for both TPC and UDP connection (which is
suprising, UDP being a connectionless protocol). This is true no matter the value set for the how
parameter.
----
Server IP: 217.71.118.166
Probable Submitter: 91.183.8.79
----
Manual Page -- http://www.php.net/manual/en/function.socket-shutdown.php
Edit -- https://master.php.net/note/edit/99956
Del: integrated -- https://master.php.net/note/delete/99956/integrated
Del: useless -- https://master.php.net/note/delete/99956/useless
Del: bad code -- https://master.php.net/note/delete/99956/bad+code
Del: spam -- https://master.php.net/note/delete/99956/spam
Del: non-english -- https://master.php.net/note/delete/99956/non-english
Del: in docs -- https://master.php.net/note/delete/99956/in+docs
Del: other reasons-- https://master.php.net/note/delete/99956
Reject -- https://master.php.net/note/reject/99956
Search -- https://master.php.net/manage/user-notes.php