Home Forums Support socket Timeout..? Reply To: socket Timeout..?

#2966
Anonymous
Inactive

Heya,

Apologies I can not always understand your question. I will do my best to answer correctly.

1. Can you please elaborate what you mean by ‘ICOP technology’? NetworkComms.Net uses Sockets internally.

2. You can close a connection if no data is sent/received within 0.5 seconds using:

foreach (Connection conn in NetworkComms.GetExistingConnection(ApplicationLayerProtocolStatus.Disabled))
{
    if (conn.ConnectionInfo.LastTrafficTime < DateTime.Now.AddMinutes(0.5))
    {
        conn.CloseConnection(false);
    }
} 

3. To configure a send timeout you need to configure:

Connection.MinNumSendsBeforeConnectionSpecificSendTimeout = 0;
Connection.DefaultMSPerKBSendTimeout = [YourSelectedTimeout];

4. The connection GUID is only available for managed connections. For unmanaged connection you have to use the ((IPEndPoint)Connection.ConnectionInfo.RemoteEndPoint) value to distinguish different connections.

Hope that helps,
Regards,
Marc