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
] [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.
Don't loop in it as in your example
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