Commit graph

46 commits

Author SHA1 Message Date
Daniel López Guimaraes
f34f86f7b7
fix(prudp): Check for matching user PID and ticket source PID 2025-02-13 21:50:11 +00:00
Daniel López Guimaraes
10faf0a38a
Merge branch 'master' into types-updates 2025-01-09 21:13:19 +00:00
Ash Logan
9e5e0332b5 fix(endpoint): Check PID invariant in FindConnectionByPID
An expected invariant of this system is that StateConnected connections also have a PID, and other states do *not* have a PID.

While any code that breaks this invariant is buggy, we can still make FindConnectionByPID resilient to this to prevent that type of bug from taking the whole server down.

That type of bug can still be detected through explicit testing of the Connections map.
2025-01-04 17:33:33 +11:00
Ash Logan
fbe2b91e75 feat(endpoint): Route connection closures via new cleanupConnection method
Centralising connection closures helps ensure that everything gets done (.cleanup()) and there's One True Way to find them in the Connections map

It's worth noting that every callsite has a PRUDPConnection*, so maybe a different datastructure would serve us better here?
2025-01-04 17:33:33 +11:00
Jonathan Barrow
27cdd4c7e3
Merge branch 'master' into types-updates 2024-07-05 13:00:33 -04:00
Michael Wolfendale
abfca9a10d
chore: remove unnecessary goroutines 2024-07-05 17:15:17 +01:00
Michael Wolfendale
348c37df5d
fix: removed double lock from reliable ping packet handling 2024-07-05 16:37:52 +01:00
Jonathan Barrow
a0107a982a
fix: AccountDetailsByPID signature to not take in a pointer 2024-07-04 17:33:14 -04:00
Jonathan Barrow
2309a6d409
Merge branch 'master' into types-updates 2024-07-03 23:26:52 -04:00
Michael Wolfendale
9997fb672a
chore: rename ResendScheduler TimeoutManager 2024-07-02 17:29:28 +01:00
Michael Wolfendale
18380590ab
feat: rework resending packets to be more accurate 2024-07-02 16:54:47 +01:00
Jonathan Barrow
b57adeb748
refactor: remove references to "Primitive" naming conventions 2024-06-16 11:52:39 -04:00
Michael Wolfendale
1258086480
fix: modify connection state checks 2024-06-11 12:49:10 +01:00
Jonathan Barrow
bfe9c9c702
chore(types): remove old Value and LegacyValue methods on PID 2024-06-07 16:59:18 -04:00
Michael Wolfendale
a638798255
fix: remove reliable check from ack packets 2024-06-06 21:24:17 +01:00
Jonathan Barrow
832bd19751
refactor(types): remove reliance on pointers 2024-06-05 17:24:00 -04:00
Jonathan Barrow
2a775ebf35
refactor(types): make Buffer into a type alias 2024-06-02 15:20:25 -04:00
Michael Wolfendale
ae41e77566
fix: prevented ping packets from acknowledging reliable packets 2024-06-02 12:07:52 +01:00
Michael Wolfendale
75c402b7ee
feat: use PacketDispatchQueue in PRUDPEndpoint 2024-05-27 21:59:51 +01:00
Michael Wolfendale
363cc7b5bf
fix: prevent multi-fragment messages being lost 2024-05-25 20:42:54 +01:00
Michael Wolfendale
4315467d6a
fix: fixed race condition in SlidingWindow 2024-05-18 09:08:07 +01:00
PabloMK7
90d81f6eb9 Implement and use deleteConnectionByID 2024-04-18 14:51:01 +02:00
Daniel López Guimaraes
d5df60ef58
chore: Update module version to v2 2024-04-07 23:40:51 +01:00
Jonathan Barrow
a7b7cd29f4
prudp: move resetHeartbeat call back to processPacket 2024-03-31 21:45:28 -04:00
Jonathan Barrow
050ebb1a88
prudp: allow for custom packet types 2024-03-17 12:12:27 -04:00
Jonathan Barrow
ff1d3b1482
prudp: rename packet flags to distinguish them from other constants 2024-03-15 18:25:46 -04:00
Jonathan Barrow
a1a590392b
chore: move constants and enums to constants package 2024-03-15 16:09:23 -04:00
Daniel López Guimaraes
0c10582680
prudp: Add connection check on ACKs
We don't expect to receive any ACKs until the client is connected, and
packet acknowledgement requires initialized sliding windows.
2024-02-22 16:09:15 +00:00
Jonathan Barrow
7b1bdc17a6
prudp: only start heartbeat once connected 2024-02-20 15:34:53 -05:00
Jonathan Barrow
36582bbc22
prudp: removed unnecessary sliding window initialization 2024-02-20 15:33:01 -05:00
Jonathan Barrow
738045e14e
prudp: rename IsSecureEndpoint to IsSecureEndPoint for accuracy 2024-02-20 15:31:45 -05:00
Jonathan Barrow
15672fd981
chore: update comment about the SecureEndPoint in PRUDPEndPoint 2024-02-20 15:29:48 -05:00
Jonathan Barrow
88a2d4bbac
rmc: add a way to enable verbose RMC messages 2024-02-18 22:35:08 -05:00
Jonathan Barrow
5f04a25d1d
prudp: added ConnectionState checks 2024-02-18 22:23:55 -05:00
Jonathan Barrow
42d8a5380c
chore: set protocols endpoint in RegisterServiceProtocol 2024-02-18 12:02:00 -05:00
Jonathan Barrow
ff03d99568
update: add Packet property to Error and OnError event hooks 2024-02-12 15:07:49 -05:00
Daniel López Guimaraes
9215e65ec3
chore: bugfixes and cleanup 2024-02-11 14:44:16 +00:00
Daniel López Guimaraes
857fb68f62
prudp: Support legacy NEX 1 clients 2024-02-11 00:56:06 +00:00
Daniel López Guimaraes
3b90bdc96b
refactor: Update ServerInterface to EndpointInterface
This requires a lot of refactor but it brings back the option of getting
events when a connection disconnects.
2024-02-11 00:03:05 +00:00
Daniel López Guimaraes
4683f67a04
prudp: DefaultstreamSettings -> DefaultStreamSettings 2024-01-25 17:35:00 +00:00
Jonathan Barrow
191455352a
update: added RegisterServiceProtocol to HPP and PRUDP servers 2024-01-24 16:40:38 -05:00
Jonathan Barrow
dc4e7ae733
update: added new Error type which conforms to the error interface 2024-01-24 14:27:17 -05:00
Jonathan Barrow
64b26b3eed
prudp: rework Kerberos ticket generation to use user accounts properly 2024-01-24 12:42:11 -05:00
Jonathan Barrow
e8b45e95ad
prudp: removed unused arguments from FindConnectionByID and FindConnectionByPID 2024-01-21 21:15:57 -05:00
Jonathan Barrow
ee2bca04df
prudp: add events back to PRUDPServer 2024-01-15 17:55:35 -05:00
Jonathan Barrow
9cec5d9e9c
prudp: completely redo virtual connections 2024-01-15 15:01:26 -05:00