#44280 [Asn->Csd]: socket_send forth argument misdocumented

From: Date: Sun, 26 Oct 2008 17:58:46 +0000
Subject: #44280 [Asn->Csd]: socket_send forth argument misdocumented
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-1255@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: Assigned +Status: Closed Bug Type: Documentation problem Operating System: linux PHP Version: Irrelevant Assigned To: kalle New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. These constants aren't available on Windows. I added two new sections with information on which constants thats defined on Unix and which thats defined on Windows. 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

« previous php.doc.bugs (#1255) next »