Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.