Hi Angus (and all who have helped)

I have created an array of (50) Twsockets.  I then choose a new one each
time I need to connect as you suggested.

It works perfectly. I don't need the timer anymore and have removed the
application.processmessages.

Everything seems perfect.  I need to give it a good testing now.

Many thanks

Chris

-----Original Message-----
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On
Behalf Of Angus Robertson - Magenta Systems Ltd
Sent: 08 December 2009 09:31
To: twsocket@elists.org
Subject: Re: [twsocket] Use of twsocket in thttpserver application

> I am using application.processmessages because I need to connect to 
> several different sockets as follows

Just create a dynamic array with one TWSocket for each connection, then
start them all together.

Application.ProcessMessages can be used in ICS client applications using
the sync methods, but must never be used in ICS server applications which
are purely async.  

> The connected event closes the connection.  My timer aborts the 
> connection if it takes too long.

You only need a single timer that checks if the connections have
completed, again an array of tickcounts when they started.  Not really
necessary to abort them, since a connection should always time out
eventually.  The ICS FTP server code does this to close idle clients. 

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to