#44280 [NEW]: socket_send forth argument misdocumented
| From: | steve_phpnet at nanovox dot com | Date: | Thu, 28 Feb 2008 05:43:18 +0000 |
| Subject: | #44280 [NEW]: socket_send forth argument misdocumented | ||
| Groups: | php.doc.bugs | ||
| Request: | Send a blank email to doc-bugs+get-552@lists.php.net to get a copy of this message | ||
From: steve_phpnet at nanovox dot com
Operating system: linux
PHP version: Irrelevant
PHP Bug Type: Documentation problem
Bug description: socket_send forth argument misdocumented
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 bug report at http://bugs.php.net/?id=44280&edit=1
--
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=44280&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=44280&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=44280&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=44280&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=44280&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=44280&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=44280&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=44280&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=44280&r=support
Expected behavior: http://bugs.php.net/fix.php?id=44280&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=44280&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=44280&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=44280&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=44280&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=44280&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=44280&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=44280&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=44280&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=44280&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=44280&r=mysqlcfg