Jump to content

Recommended Posts

Posted

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.

Posted

Maybe check if the process is still running using PROCESSEXISTS?

...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format
Posted

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.

Posted (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 by VicTT
Quote

Together we might liveDivided we must fall

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...