|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2008-10-26 17:58 UTC] kalle@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 08 15:00:02 2026 UTC |
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.