Jump to content

normal behavior?


Michdd

Recommended Posts

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.