wxSocket - How to get the number of received bytes

Joachim Wiesemann newsantwort.xyz at jwiesemann.de
Tue Oct 2 00:03:39 PDT 2007


Hi,

I'm looking for a way tro get the number of recieved bytes of a
wxSocketBase with actually moving the data.

I receive a big record on every transmission but the record gets
fractioned. Thus I get several Socket-Events for one record. I want to
leave all data in the wxSocket-buffer until the record is complete. Is
there a way just to get the size auf the data that could be read? 

Using Peek means I have to allocate a buffer and move the data and if
the number of bytes is correct I have to read it again.
 
If I Read the data and Unread it if the number of bytes is incorrect I
move it twice, too.

Best regards,
Joachim

-- 
Dr. Joachim Wiesemann
http://jwiesemann.com/     Electrical Engineering, Usability






More information about the wx-users mailing list