DialogSocket real receiveBytes

Discussion of ideas for features and new projects based on POCO.
Posts: 7
Joined: 12 Jul 2010, 04:12

DialogSocket real receiveBytes

Postby delphi13 » 12 Jul 2010, 04:39


Unless I am reading the code incorrectly, a receiveBytes call on a DialogSocket is effectively useless. Because DialogSockets implements a secondary buffer, some unread bytes may already exist in this buffer and thus would be invisible to a direct receiveBytes call. receiveBytes would read the next length bytes from the socket directly.

Ideally is would be helpful if a receiveBytes implementation could be created in DialogSocket that is aware of the internal buffer. Alternately maybe a receiveBytes call should generate an exception of some type since it's behavior in DialogSocket is erratic at best.

Thanks for your time.

Posts: 1268
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: DialogSocket real receiveBytes

Postby guenter » 14 Jul 2010, 11:07

I have documented that issue in 1.3.7 and added a receiveRawBytes() method that should be used instead.

Return to “Wishlist”

Who is online

Users browsing this forum: No registered users and 2 guests