> Hello, I could use the component TWSocketServer based on this 
> example: http://edn.embarcadero.com/br/article/20465
> now it seems to be working perfectly connecting to POS terminals

That article was written by Francois, so I'm sure it's fine.  I doubt
it's any different to the existing ICS demos. 

> when the connection is terminated the client side, or 
> simply strip the cable network, the server is terminated after some
> time (timeout)?

If the remote client properly disconnects, the server client should drop.


If the connection drops unexpectedly when no traffic is being sent, there
will be no disconnection so you need to implement a timeout.  Look at the
ICS FTP server which does exactly that.  

Basically you use GetTickCount to set a variable to indicate when each
client connects and when data is sent or received, then have a single
global timer firing every five seconds which checks each client in turn
and disconnects any that last had activity two minutes ago or whatever
you need.  Don't use a timer per client. 

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

Reply via email to