Overview
Features
Download
Documentation
Community
Add-Ons & Services

DialogSocket real receiveBytes

Discussion of ideas for features and new projects based on POCO.

DialogSocket real receiveBytes

Postby delphi13 » 12 Jul 2010, 04:39

Howdy,

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.
delphi13
 
Posts: 6
Joined: 12 Jul 2010, 04:12

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.
guenter
 
Posts: 1092
Joined: 11 Jul 2006, 16:27
Location: Austria


Return to Wishlist

Who is online

Users browsing this forum: No registered users and 1 guest