TIdUDPClient in a thread?

TIdUDPClient in a thread?

Post by Richard Bi » Thu, 19 Aug 2004 05:49:19


Hej,

I am using a TIdUDPClient in a thread to send a simple message to
TIdUDPServer. Is this likely to cause problems?

When i start a number of symultaneous instances of the thread i get an
exception with: EIdInvalidSocket 'Cannot allocate socket'.

Is this related to the fact that the threads are trying to allocate sockets
at the same time?

/Richard
 
 
 

TIdUDPClient in a thread?

Post by Graham Har » Thu, 19 Aug 2004 07:14:11


If you are trying to use the same port on the machine, then you will get
an error. Also the number of available sockets may of been reached on
the machine.

You might want to try and use one UDP Client amongst all threads and
buffer the data accross the thread boundaries

HTH

Graham Harris

 
 
 

TIdUDPClient in a thread?

Post by Richard Bi » Thu, 19 Aug 2004 15:23:16

Thanks for the reply...

Do you mean the client machine, or the server machine?


"Richard Bibby" < XXXX@XXXXX.COM > skrev i meddelandet

sockets
 
 
 

TIdUDPClient in a thread?

Post by Graham Har » Fri, 20 Aug 2004 03:11:29


The Client machine

Graham Harris
 
 
 

TIdUDPClient in a thread?

Post by Graham Har » Fri, 20 Aug 2004 03:11:29


The Client machine

Graham Harris