hmmm how can I tell the end of an $SR command? There is no |
Moderator: Moderators
hmmm how can I tell the end of an $SR command? There is no |
The subject pretty much says it all. There is no | at the end of a $SR command so how is it possible to know that we have reached the end? If I wait for the begining of another command (i.e. look for a second $) then I never get the last one ...
-
- The Creator Himself
- Posts: 296
- Joined: 2003-01-02 17:15
Marvin I'm afraid that is not correct. A $SR command ends with the IP of the hub the user is in in brackets. Plus, $SR is not the only command you will be receiving through the UDP port, so I need a solution that will work for all of them.
arnetheduck that sounds like a solution. You are saying that every time I tell the socket to return me the received data it will reply with a single packet even if it has received more than one, correct?
Thank you both for your replies.
arnetheduck that sounds like a solution. You are saying that every time I tell the socket to return me the received data it will reply with a single packet even if it has received more than one, correct?
Thank you both for your replies.
and if I remember correctly, the only other things than $SR you can recieve are $Ping's, but I'm not sure when and how they are sent[/quote]man 7 udp wrote: All receive operations return only one packet. When the packet is smaller than the passed buffer
only that much data is returned, when it is bigger the packet is truncated and the MSG_TRUNC flag is
set. MSG_WAITALL is not supported.
http://dc.selwerd.nl/hublist.xml.bz2
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)
http://www.b.ali.btinternet.co.uk/DCPlusPlus/index.html (TheParanoidOne's DC++ Guide)
http://www.dslreports.com/faq/dc (BSOD2600's Direct Connect FAQ)