#44280 [Opn->Asn]: socket_send forth argument misdocumented
| From: | kalle@php.net | Date: | Sun, 26 Oct 2008 16:57:11 +0000 |
| Subject: | #44280 [Opn->Asn]: socket_send forth argument misdocumented | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-1254@lists.php.net to get a copy of this message | ||
ID: 44280
Updated by: kalle@php.net
Reported By: steve_phpnet at nanovox dot com
-Status: Open
+Status: Assigned
Bug Type: Documentation problem
Operating System: linux
PHP Version: Irrelevant
-Assigned To:
+Assigned To: kalle
Previous Comments:
------------------------------------------------------------------------
[2008-02-28 05:43:18] steve_phpnet at nanovox dot com
Description:
------------
The fourth (last) argument described on the socket_send function
(flags) does not describe the correct set of constants used to get the
described effect. I get a message stating that any of the MSG_
constants are undefined when I attempt to use this function.
Reproduce code:
---------------
$socket = socket_create (AF_INET, SOCK_STREAM, SOL_TCP);
socket_bind ($socket, 'localhost', '54321');
socket_set_block($socket);
socket_listen ($socket);
while ($conn = socket_accept ($socket)) {
socket_send ($conn, "ABCD", 4, MSG_EOF); // MSG_EOF not defined
socket_close ($conn);
}
socket_close ($socket);
Expected result:
----------------
The expected result is that all four of the MSG_ constants are defined
as documented.
Actual result:
--------------
The actual result is that the constants are undefined and the data is
never sent over the socket.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=44280&edit=1