Coolw Posted August 4, 2008 Share Posted August 4, 2008 (edited) I am trying to see if a program communicating on port 27015 at my IP address, using the _getip function TCPStartup() $starttime = TimerInit() $PublicIP = _GetIP() If TimerDiff($starttime) >= $checkerror1 Then $socket = TCPConnect($PublicIP, 27015) If $socket = -1 Then $msgbox = MsgBox(4,"Error", "Server crashed, restart?", 10) If $msgbox = 6 or $msgbox = -1 Then $as_Body = " Server:Server Crashed, Attempting Restart" ;_logfile() ;_smscheck() ;_RestartServer() ElseIf $msgbox = 7 Then Exit EndIf EndIf TCPCloseSocket($socket) $starttime = TimerInit() ;$checkerror1 = GUICtrlRead($checkerror) * 1000 EndIf But the problem is, it works sometimes, and at others, it doesn't work, and restarts the server even though it is still up. Any clue to what I am doing wrong? I can provide the whole source code if you PM me. Edited August 4, 2008 by Coolw My ProgramsMy WIP'sSteam Server Restarter Link to comment Share on other sites More sharing options...
Coolw Posted August 4, 2008 Author Share Posted August 4, 2008 any help please? My ProgramsMy WIP'sSteam Server Restarter 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