| Subject: | Concurrent processing for TidUDPServer? [Edit] |
| Posted by: | joshua lim |
| Date: | Sun, 28 Feb 2010 |
Hi, i'm currently using the OnUDPRead event to call a procedure.
procedure TService1.IdUDPServer1UDPRead(AThread: TIdUDPListenerThread;
AData: TIdBytes; ABinding: TIdSocketHandle);
var
....
begin
//start code
.....
//end code
end;
I noticed that until the execution of this procedure completes, OnUDPRead will not call another instance of this procedure. For now, my traffic is low, so this is ok, but I am wondering what happens if many UDP clients connect to my UDP Server and starts sending data concurrently, would I face a performance issue and worst still a hanging problem?
How can I code such that I call the procedure without waiting for a previous execution to end? Would appreciate any example or links. Thanks.
Edited by: joshua lim on Feb 28, 2010 10:15 AM