Michdd Posted September 15, 2009 Share Posted September 15, 2009 Is it normal behavior for a socket to close after a certain amount of time where no data has been sent or received? Essentially what I want to know is if it's normal, or something some setting would cause or a problem with my code. I have a server-side application in PHP, and the client in Flash. It seems like after a while of no data being passed I get this error: Warning: socket_read(): unable to read from socket [0]: An existing connection w as forcibly closed by the remote host. Does this sound like standard behavior (if so it would be corrected by simply sending a null packet every X minutes), or is it something wrong with my code? Link to comment https://forums.phpfreaks.com/topic/174354-normal-behavior/ Share on other sites More sharing options...
.josh Posted September 15, 2009 Share Posted September 15, 2009 yes. usually the server you connected to occasionally pings you and you have to look for it and pong them back, or else it assumes you are inactive and disconnects you. Link to comment https://forums.phpfreaks.com/topic/174354-normal-behavior/#findComment-919031 Share on other sites More sharing options...
Michdd Posted September 15, 2009 Author Share Posted September 15, 2009 yes. usually the server you connected to occasionally pings you and you have to look for it and pong them back, or else it assumes you are inactive and disconnects you. Yes, but this is my server. I'm connecting to my own server, and I didn't implement a pinging system. Link to comment https://forums.phpfreaks.com/topic/174354-normal-behavior/#findComment-919035 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.