Edit report at http://bugs.php.net/bug.php?id=52848&edit=1

 ID:                 52848
 Comment by:         php dot net at phrozenbyte dot de
 Reported by:        php dot net at phrozenbyte dot de
 Summary:            Processing out-of-band data doesn't work
 Status:             To be documented
 Type:               Bug
 Package:            Streams related
 Operating System:   Ubuntu 10.04 Lucid Lynx
 PHP Version:        5.3.3
 Block user comment: N

 New Comment:

When you're sending data out-of-band (one or more bytes make no
difference) and the client socket is in $read and $except of
stream_select() the socket will be available every time in both arrays.


Previous Comments:
------------------------------------------------------------------------
[2010-09-15 20:41:18] php dot net at phrozenbyte dot de

Ok, thanks. As cataphract at php dot net mentioned first there are
situations on which even that single byte isn't shown. I'm not able to
reproduce the bug, the only possibility is to repeat running my test
server and client. After some trys the script will result in

OOB-Data 1/2: ''

OOB-Data 2/2: ''

Data 1/2: '12345678'

Data 2/2: ''

------------------------------------------------------------------------
[2010-09-15 16:15:20] cataphr...@php.net

It should be documented in stream_socket_sendto and
stream_socket_recvfrom, that OOB data can be only one byte long.

------------------------------------------------------------------------
[2010-09-15 16:13:20] cataphr...@php.net

"In Transmission Control Protocol (TCP), the OOB data block is always
one byte. Therefore, if you send multiple-byte OOB data, only the last
byte of the OOB data is retrieved. The remaining data is treated like
normal data."



See also http://support.microsoft.com/kb/830597

------------------------------------------------------------------------
[2010-09-15 14:44:54] cataphr...@php.net

Sorry, correction: Windows presented the same behavior.

------------------------------------------------------------------------
[2010-09-15 14:15:06] cataphr...@php.net

I can reproduce it in Linux.



In Windows, the server gets no data at all (the first
stream_socket_recvfrom keeps blocking indefinitely).

------------------------------------------------------------------------


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    http://bugs.php.net/bug.php?id=52848


-- 
Edit this bug report at http://bugs.php.net/bug.php?id=52848&edit=1

Reply via email to