Author Topic: Latency and Packet Loss simulation  (Read 739 times)

TimeJockey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Latency and Packet Loss simulation
« on: May 24, 2017, 09:32:41 PM »
Is there any support for simulating lag and packet loss? It's a feature I've seen in a number of other network frameworks, and would be super helpful when testing how robust my netcode is.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,154
  • Toronto, Canada
    • View Profile
Re: Latency and Packet Loss simulation
« Reply #1 on: May 25, 2017, 05:57:57 AM »
Not at this time, no. I'm likely going to add it at some point as I'd like the ability to test latency myself, but I've been delaying it because I do online testing with my closed alpha players and it's giving me a way to test latency properly without any additional code.

Also note there is no packet loss with TNet. TCP = no packet loss.

TimeJockey

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 2
    • View Profile
Re: Latency and Packet Loss simulation
« Reply #2 on: May 25, 2017, 06:02:36 PM »
I'm trying to use udp if available, so just want to make sure I can deal with missing/duplicate/out of order packets. Wire shark tells me I'm falling back on TCP anyway, so I'll need to figure out why udp it's working at the moment.

Good to know it's on your radar, but in the mean time I might be able to give something like this a go

https://jagt.github.io/clumsy/

cmifwdll

  • Global Moderator
  • Sr. Member
  • *****
  • Thank You
  • -Given: 0
  • -Receive: 149
  • Posts: 285
  • TNet Alchemist
    • View Profile
Re: Latency and Packet Loss simulation
« Reply #3 on: June 04, 2017, 08:08:30 PM »
The connection is TCP, and you must be connected to enable and use UDP. There's really no downside to using just TCP. I used to think UDP would be best, too, but TCP is just too convenient. I think the only thing I use UDP for now is VoIP.