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

Author Topic: ttl  (Read 2806 times)

0 Members and 1 Guest are viewing this topic.

Visor

  • Newbie
  • *
  • Posts: 21
    • View Profile
ttl
« on: March 11, 2017, 11:03:53 pm »
Hello,

I'm working on network with SFML and I just would like to know if a next version of the SFML will allow to define the ttl's packet ?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: ttl
« Reply #1 on: March 12, 2017, 09:15:28 am »
There's no plan for exposing TTL on SFML sockets, but if you feel like there's a good reason to do so, you can tell us.
Laurent Gomila - SFML developer

Visor

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: ttl
« Reply #2 on: March 12, 2017, 11:19:29 am »
Okay.

I'm working on a multiplayer game with a VPS as Master Server.
I'll keep a lot of connections opened between the server and each clients in UDP, but I don't want to *really* have a connection between them. The server can take a while before sending the data (so the number of clients waiting can be huge), I just need to keep the router of each client opened to receive it. In my opinion TCP isn't a good alternative.

I usually change the TTL to 3 or 4 maximum so the client's router keep the VPS's ip in its cache but the packet will be deleted quickly before received by the VPS, and any data sent from the Master Server to this router will be rerouted to the local client IP successfully.

It seems to me that TTL modification is pretty used for game network programming. Whether big or small studios.
« Last Edit: March 12, 2017, 11:25:58 am by Bloo »

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: ttl
« Reply #3 on: March 12, 2017, 10:33:52 pm »
It sounds like you're describing UDP hole punching, is that correct?

Visor

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: ttl
« Reply #4 on: March 13, 2017, 12:02:09 am »
Yes, that's the case ! That's why I personally need TTL exposition.

But that's just my example, and I don't think I'm alone.

Turbine

  • Full Member
  • ***
  • Posts: 102
    • View Profile
Re: ttl
« Reply #5 on: March 13, 2017, 04:32:08 am »
You're not alone, most of us just don't understand how to make holepunching work. +1 agree

 

anything