CS support mailing
Asunto: Re: [twsocket] UDP ReceiveFrom error
Hello Lorenzo,
I see one bug. Possible that's the reason:
FromIPLen = sizeof(FromIP); // Add this !!
rec = server->ReceiveFrom(block, sizeof(block), FromIP, FromIPLen);
---
Rgds, Wilfried [TeamICS]
http://www.overby
Hello Lorenzo,
I see one bug. Possible that's the reason:
FromIPLen = sizeof(FromIP); // Add this !!
rec = server->ReceiveFrom(block, sizeof(block), FromIP, FromIPLen);
---
Rgds, Wilfried [TeamICS]
http://www.overbyte.be/eng/overbyte/teamics.html
http://www.mestdagh.biz
--
To unsubscribe or
je original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
nombre de Wilfried Mestdagh
Enviado el: jueves, 13 de septiembre de 2007 13:18
Para: ICS support mailing
Asunto: Re: [twsocket] UDP ReceiveFrom error
Hello Lorenzo,
You only can call Receive or ReceiveFrom 1 time in OnDataAvailable.
Hello Lorenzo,
You only can call Receive or ReceiveFrom 1 time in OnDataAvailable.
Don't loop in it as in your example. This could be the trouble. If you
don't have received all available data then OnDataAvailable will fire
again and there you receive the rest.
However with UDP packet bounds are
Hi,
I have two UDP listener sockets in a worker thread (I use a thread because is a
DLL). When I receive any data in the OnDataAvailable, ReceiveFrom method call
return -1 and OnDataAvailable is triggered in a infinite loop. The same code
with Receive method works fine.
What is wrong? Could be a