We are implementing an authentication mechanism. We are using session_id, user name, $REMOTE_ADDR and $REMOTE_PORT based authentication to avoid multiple sessions of the same user. However, if the client side machine crashes, the server wouldn't know about this. If the same user now tries to log-on either from the same machine or from a different machine, we need to make sure if the earlier registered parameters against this user is still valid or not. So we planned to validate if the $REMOTE_ADDR is active and if it is, if the $REMOTE_PORT is also active. If yes, then we deny his second login attempt. If not, then we assume that his earlier session crashed and make way of the new one. We tried all socket functions but the connection to the client ip and port is not allowed. We get the message 'Connection Refused'. Is there any other way to check if there is any client application at client's IP address and port# ? Any help is greatly appreciated.
Thanks,
Giri