delphi - How to deal with network drops and Indy IdTCPServer -


I have created a client / server application with the IDTCPP component. Customers should maintain and maintain consistent connections through the life of the application. If the network connection is dropped (which happens quite often because the clients connect to the wireless aircurdle) the client will automatically reconnect, all this works well.

My problem is working with sockets on the server related to the lost connection. They do not detect network drop and disconnect themselves. After reading several related articles, I learned that the server should know whether the connection was deleted. Some events will have to wait to find it.

So my question is, should I "handle" sockets from time to time to create some mechanism in my server? And if so, how? I thought that in a way all connections will be cycled through and they will try to send the data. I think it will trigger a required "event".

Any kind of heartbeats or ping signals, the server routinely server-side session Can be used to keep alive if the signal stops, and an expiration gap passes, the server may assume that the client has lost the connection.

(If the server only uses socket connection to send data to the client, then the server does not know that the customer receives it. Data may be somewhere interrupted.)

< / Div>

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -