-
Aug 19th, 2022, 12:13 AM
#1
Thread Starter
Banned
server to client question
the server has a list of users.
I run a loop through the user list and send a packet to check if the client is running.
1:how do I check on the server side if the message was sent or failed to send?
2: how will I know if that user client.exe is running?
sometimes the server may have 1 or more users stuck and fail to close their socket because the client pc hanged/froze/ some pc bug and the client doesn't run most of the unload code from a certain form, I could be wrong but this is what am thinking.
so this is why am trying to run a check at certain intervals to see if they are online or offline.
-
Aug 19th, 2022, 01:18 AM
#2
Re: server to client question
There are multiple things that can cause a connection to be lost, the most common of which is the computer going to sleep. The client should send a periodic "keep alive" signal. I use a single byte record. If the server does not receive that signal with the specified time period, it closes the connection.
J.A. Coutts
Last edited by couttsj; Aug 19th, 2022 at 01:34 AM.
-
Aug 19th, 2022, 01:59 PM
#3
Thread Starter
Banned
Re: server to client question
Originally Posted by couttsj
There are multiple things that can cause a connection to be lost, the most common of which is the computer going to sleep. The client should send a periodic "keep alive" signal. I use a single byte record. If the server does not receive that signal with the specified time period, it closes the connection.
J.A. Coutts
Can you share examples of bytes you send and server side checking code
-
Aug 20th, 2022, 01:00 AM
#4
Re: server to client question
Originally Posted by jenniger9
Can you share examples of bytes you send and server side checking code
See
https://www.vbforums.com/showthread....cure-Messaging
for example.
J.A. Coutts
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|