Commit graph

548 commits

Author SHA1 Message Date
PabloMK7
c816953698 Always ACK incoming packets & separate pings from packet manager 2023-09-14 19:13:47 +02:00
Jonathan Barrow
15fae560cf
Lower resend time to one second 2023-09-12 17:23:03 -04:00
Jonathan Barrow
5cadb76359
Only do multi-ack handling if packet is multi-ack 2023-09-12 17:04:05 -04:00
Jonathan Barrow
1fc69bc8e3
Removed multi-ack version set. Check PRUDP version 2023-09-12 17:03:22 -04:00
Jonathan Barrow
a4757b43db
Added debug logs to PacketResendManager 2023-09-12 16:38:17 -04:00
Jonathan Barrow
3797b40f54
Updated SetResendMaxIterations Godoc comment 2023-09-12 15:56:12 -04:00
Jonathan Barrow
d345357f79
Removed comments from packet Bytes methods 2023-09-12 15:49:58 -04:00
Jonathan Barrow
6be87c5a98
Added server->client packet retransmission 2023-09-12 15:47:39 -04:00
Jonathan Barrow
bfd484bf48
Merge pull request #35 from PabloMK7/simulatedrops
Add emulated packet drop option
2023-09-12 13:14:16 -04:00
PabloMK7
787a9dab07
Update server.go
Co-authored-by: Daniel López Guimaraes <112760654+DaniElectra@users.noreply.github.com>
2023-09-12 17:37:58 +02:00
PabloMK7
760eedd914
Update server.go
Co-authored-by: Daniel López Guimaraes <112760654+DaniElectra@users.noreply.github.com>
2023-09-12 17:37:41 +02:00
PabloMK7
340a52d97e Add emulated packet drop option 2023-09-12 14:17:47 +02:00
Jonathan Barrow
8e627d0801
Added SequenceIDManager and separate counters for reliable and PING packets 2023-09-11 13:35:41 -04:00
Daniel López Guimaraes
cb09b0045f
Stop timeout on GracefulKick 2023-09-05 20:56:57 +01:00
Daniel López Guimaraes
810ab36c03
Stop timeout when receiving disconnect packet
Don't send the timeout packet when the client disconnects reliably.
2023-09-05 20:51:10 +01:00
Jonathan Barrow
aac9380b18
refactor: keep checking for packets in PacketManager pool using Next loop 2023-09-03 19:02:14 -04:00
Jonathan Barrow
58359dce0c
chore: remove old TODO in client.go 2023-09-03 18:51:30 -04:00
Jonathan Barrow
c98e4817f1
feat: beginnings of deferred packet handling 2023-09-03 18:27:14 -04:00
Jonathan Barrow
23f3683781
update: added experimental MutexMap type for safe map access 2023-09-03 17:00:19 -04:00
Jonathan Barrow
9a8eb5c83f
update: added ReadRemaining method to StreamIn 2023-09-03 16:35:39 -04:00
Jonathan Barrow
1534de94ab
update: added Remaining method to StreamIn 2023-09-03 16:34:07 -04:00
Jonathan Barrow
acd5855c0d
Merge pull request #33 from DaniElectra/mutex 2023-09-02 15:09:15 -04:00
Daniel López Guimaraes
300253aaea
Add mutex for accessing server clients
Prevents server panic from client overload.
2023-09-02 19:47:40 +01:00
Jonathan Barrow
f03f66853c
Added DataHolder list methods to streams 2023-08-31 00:47:27 -04:00
Jonathan Barrow
dbb309e9c9
Added more robust semver checks for NEX versions and Structure version checks 2023-08-30 17:39:40 -04:00
Jonathan Barrow
b96c56c9a3
Added Pl field StationURL 2023-08-29 13:37:24 -04:00
Jonathan Barrow
b6924769b4
Client now stores StationURLs as structs not strings 2023-08-15 06:46:15 -04:00
Jonathan Barrow
48a9f6b538
StationURL values now uses uint32 pointers instead of strings 2023-08-15 06:45:45 -04:00
Jonathan Barrow
3ef56ce892
Merge pull request #32 from DaniElectra/reflect
Use Sprintf() for registering data holders
2023-08-06 18:24:14 -04:00
Daniel López Guimaraes
3ce17c63ea
Update go modules and change data holder registers 2023-08-06 21:10:25 +01:00
Daniel López Guimaraes
16c5f5eca9
Use crypto/rand over math/rand
Also add error handling for rand.Read()
2023-08-06 01:36:14 +01:00
Daniel López Guimaraes
11bf2a0d33
Use Sprintf() for registering data holders
This allows us to reduce usage of reflect.
2023-08-06 01:35:27 +01:00
Jonathan Barrow
64b28c3b02
Fixed StreamIn.ReadMap using the key function twice 2023-07-24 15:02:45 -04:00
Jonathan Barrow
d770a11b34
Forgot to run go mod tidy 2023-07-24 14:57:12 -04:00
Jonathan Barrow
73c23905e5
Updated go modules 2023-07-24 14:50:16 -04:00
Jonathan Barrow
d4c278e299
Simplify StreamIn.ReadMap to only use one switch 2023-07-24 14:49:53 -04:00
Jonathan Barrow
eeed43b4da
Fixed StreamIn.ReadMap failing to read Variant types 2023-07-24 14:39:04 -04:00
Jonathan Barrow
643ed8d44d
Added List<Buffer> read and write methods 2023-07-22 13:41:52 -04:00
Jonathan Barrow
b5b1381f95
Added StreamOut.WriteListStationURL 2023-07-21 21:42:16 -04:00
Jonathan Barrow
e57bba0665
Make NewServer use NewNEXVersion in SetDefaultNEXVersion 2023-07-12 16:31:38 -04:00
Jonathan Barrow
b4521a7879
Added NAT Traversal protocol version 2023-07-12 16:30:03 -04:00
Jonathan Barrow
981504d417
Fixed SetDefaultNEXVersion setting all versions to the same pointer 2023-07-12 16:27:10 -04:00
Jonathan Barrow
a3b28f6ad2
Added Copy method to NEXVersion and NewPatchedNEXVersion/NewNEXVersion functions 2023-07-12 16:25:42 -04:00
Jonathan Barrow
b4f7414f0c
Added String and FormatToString methods to all types 2023-06-29 17:44:59 -04:00
Jonathan Barrow
685a41b101
Updated library versions 2023-06-29 17:44:06 -04:00
Jonathan Barrow
6e9137610b
Merge pull request #31 from DaniElectra/rvconnectiondata
Add NEX version check to RVConnectionData
2023-06-21 16:57:05 -04:00
Daniel López Guimaraes
def33b948e
Fix some typos 2023-06-21 21:49:33 +01:00
Daniel López Guimaraes
b0f07b5924
Change RVConnectionData.time to DateTime
Also set structure version 1 if NEX version is 3.5+
2023-06-21 21:48:55 +01:00
Daniel López Guimaraes
9daf03e6a9
Add NEX version check to RVConnectionData
The time parameter is only present since NEX 3.5
2023-06-20 23:22:07 +01:00
Jonathan Barrow
81594ad489
Added all missing Stream read/write methods for number types 2023-06-09 12:53:57 -04:00