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 preserved, so you will receive the
whole packet at once. Be sure your receiving buffer is large enough.
The MultiThreaded is nececary yes.
Also be sure you create and destroy TWSocket in the Execute method of
the thread. If you do not you have a false thread wich can also cause
Rgds, Wilfried [TeamICS]
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be