Mason Posted December 6, 2005 Share Posted December 6, 2005 Is there a way to check if a connection still exists...say my AutoIt client crashes, and I want my server to drop the connection if it doesn't exist anymore...I couldn't see any useful functions for this but...I could be missing something. Link to comment Share on other sites More sharing options...
jefhal Posted December 6, 2005 Share Posted December 6, 2005 Maybe check if the process is still running using PROCESSEXISTS? ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Mason Posted December 6, 2005 Author Share Posted December 6, 2005 Ugh...mabe you misunderstood the problem. I have a client/server in TCP. If the client/server crashes due to AutoIt error, or windows error, I want to let the other to know about it. Link to comment Share on other sites More sharing options...
VicTT Posted December 6, 2005 Share Posted December 6, 2005 (edited) Yea...you try to receive data from it and if error is either 10054 or -1 then the connection is down... so while 1 $read=TCPRecv($socket,$buffer_length) if @error=-1 OR @error=10054 then Msgbox(0,"","Socket is dead!") ExitLoop else TrayTip("","Socket alive and well",10) endif wend Edited December 6, 2005 by VicTT Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
VicTT Posted December 6, 2005 Share Posted December 6, 2005 Don't forget to thank me! Quote Together we might liveDivided we must fall Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now