Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Morzie

Pages: [1]
1
Network / Re: How to, keepalive (TCP)
« on: August 25, 2016, 02:52:44 am »
Quote
The easiest way is to implement the feature yourself with regular packets.
So would you suggest creating my own packet class deriving from SFML's packet or ditch SFML and pick up something like Winsock for networking?

2
Network / Re: How to, keepalive (TCP)
« on: August 24, 2016, 09:08:48 am »
Quote
implement a kind of ping-pong (often called "hartbeat" in this context)
This is what I'm taking about when I say "keepalive", it doesn't mean to keep the client alive, it's sending an empty packet with the ACK flag set and wait for the client to respond, and if they don't, close the socket, however I don't know how to access the raw TCP data to set the ACK flag or check if it is set on the client's side?

http://tldp.org/HOWTO/TCP-Keepalive-HOWTO/overview.html

3
Network / How to, keepalive (TCP)
« on: August 24, 2016, 08:27:28 am »
I'm relatively new to networking in general but I've been looking into networking as a kind of side project.
Anyways, I've been trying to solve the problem of the client suddenly disconnecting in a way that doesn't allow SFML to automatically tell the server it has disconnected, and thus the server has continues to wait indefinitely (I think there's a timeout built into windows but I think it's like 7 hours, which is way too long).
So I'm trying to find a way to implement keepalive packets but have found nothing about in with SFML and I can't seem to find a way to tinker with SFML's packet's raw data?

Any suggestions or resolutions to the problem?

Pages: [1]