Terminate an inactive socket connection from TIdTCPServer

Posted by A.J. on Stack Overflow See other posts from Stack Overflow or by A.J.
Published on 2010-03-04T00:41:28Z Indexed on 2010/05/08 16:38 UTC
Read the original article Hit count: 204

Filed under:
|
|

We have an application which listens for incoming TCP requests using the Indy 10.1.1 components that ship with Delphi 2007.

Occassionally we receive incoming connections which are not from our client application. Typically, one of two things happens: 1) the connection is terminated by the client before any data is received, or 2) data is received which we're not expecting and we manually terminate the connection.

However, we've received connections where no data is received and appear to persist until the client terminates the connection from their end.

Is there a way to terminate such a connection from the server if no data is received after a specified amount of time?

© Stack Overflow or respective owner

Related posts about delphi

Related posts about tcp