tsolrm Posted March 10, 2012 Posted March 10, 2012 I've got a tcp chat - a server and multiple clients I've opened my client and was online but afk. after about 40 minutes i've tried to send a message but was dropped from the server. I checked the server script - it was running. Is there some sort of limit for this? The server is looped to recieve messages from each individual client and sends them back to all clients The client is looped to recieve messages
tsolrm Posted March 10, 2012 Author Posted March 10, 2012 $NewMessage = TCPRecv ($TCPConnect, 100000) If @error Then $error = @error GUIDelete () MsgBox (16, "test", "Lost connection: "&$error) TCPCloseSocket($TCPConnect) Exit EndIf I get the message box that connection has been lost. The server is deffinitely running cos I can log on again.
Developers Jos Posted March 10, 2012 Developers Posted March 10, 2012 How are you testing this connection? Is it within your own LAN with only a Switch inbetween or is there a LAT router in the the path? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
tsolrm Posted March 10, 2012 Author Posted March 10, 2012 (edited) it's not a local server. Clients are miles away Yes i have a router, i've set up port forwarding Edited March 10, 2012 by tsolrm
Developers Jos Posted March 10, 2012 Developers Posted March 10, 2012 Maybe its your LAT router that timeout on the Session it has in its connection table. Are you sending Keep-Alives to indicate the session is still there? You could try to run the script on 2 machines on your local LAN and see if that gives the same error. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past.
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