Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

At work we use External USB Modem for the users that are reporting on site, as there is no permanent internet facility available.

 

I�ve been working on a chat program to link all users together, both the Server and Client are working fine over the internet, but I�ve hit a snag and I�m not to sure how to go about fixing it.

 

If a user closes the program data arrives to the server which is Zero in length this signifies to the server that the user has disconnected and all other users that are connected are informed of this.

 

The problem I�ve got is if the connection goes down (on a datacard it can quite often depending on signal strength) or the datacard is disconnected, a signal does not get sent to the Server about the disconnection, this means that:

 

A: The socket is unavailable to use again as the server is still saying that it�s in use.

B: No other user gets informed of the disconnected user not been available.

 

Can anybody think of a way around this problem??

  • Administrators
Posted

Could the server track how long it is since a particular client sent anything and if it is past a particular threshold have the server close the port.

 

The client could periodically send a dummy request to the server to keep the connection alive if it hasn't actually had any real information to transmit.

Posting Guidelines FAQ Post Formatting

 

Intellectuals solve problems; geniuses prevent them.

-- Albert Einstein

Posted

Ping

 

If the server periodically sends a "ping" style message to the client, eventually network failures will be detected by the underlying transport protocols and then get propagated back to your server application to handle appropriately.

 

Good luck :cool:

Never trouble another for what you can do for yourself.

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.   Paste as plain text instead

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