Commit graph

617 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
Ash Logan
6ec50052cd fix(datetime): Have FromTimestamp modify the underlying DateTime
This got lost in the types refactor, and was a rare case of the pointer receiver actually being needed - various apps depended on this function modifying the underlying value.

One could also argue for this being factored out into a NewDateTimeFromTimestamp function or something, but this way is source-compatible with older code.
2025-01-27 19:52:18 +11:00
Daniel López Guimaraes
a7fb52ae81
chore: Update go modules 2025-01-12 20:15:30 +00:00
Jonathan Barrow
7159d9120d
Merge pull request #56 from PretendoNetwork/types-updates 2025-01-12 14:44:28 -05:00
Daniel López Guimaraes
be12609cc1
chore: Move DataHolder into its own file 2025-01-11 22:37:31 +00:00
Daniel López Guimaraes
9c8f7bd62e
chore(AnyObjectHolder): Inline cast check 2025-01-11 22:37:00 +00:00
Daniel López Guimaraes
340b851e5f
refactor: Replace AnyDataHolder with AnyObjectHolder 2025-01-09 23:21:11 +00:00
Daniel López Guimaraes
10faf0a38a
Merge branch 'master' into types-updates 2025-01-09 21:13:19 +00:00
Jonathan Barrow
9a3d0bcbb1
Merge pull request #76 from PretendoNetwork/patch/cleanup-connections 2025-01-06 18:30:37 -05: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
Ash
461d2f2846
Merge pull request #75 from PretendoNetwork/patch/simplify-socket-connection 2025-01-04 10:56:37 +11:00
Ash Logan
5dda129a6f chore: Remove Connections tracking from SocketConnection
Every SocketConnection had a map of *PRUDPConnection, which was never actually inserted into anywhere, so the intended function of tracking what OS sockets have which PRUDP streams was not being done.

Remove it as dead code. If the rest of the connection tracking is going to be implemented, this commit can be reverted.

Since the SocketConnection no longer has long-lived state in it, also remove the map on PRUDPServer and just create it as a simple data structure when needed.

The connection close handling of the websocket server had to be rewritten - the old code would never do anything due to the empty maps, so this can't be *worse* than nothing :)
2025-01-03 17:58:46 +11:00
Ash Logan
6f3f3d1b4a .gitignore: add IDEA 2025-01-03 17:54:55 +11:00
Daniel López Guimaraes
eee4fc9e88
fix(AnyDataHolder): Use CopyRef to get RVTypePtr of object data
The previous method didn't work because it was making a pointer of the
RVType interface instead of the underlying data.
2024-12-24 13:08:01 +00:00
Jonathan Barrow
2797330f2f
chore: fix kerberos.go indentation 2024-11-20 15:04:05 -05:00
Jonathan Barrow
359eb435c2
refactor(types): simplify CopyRef() to use Copy() internally 2024-11-17 14:36:06 -05:00
Jonathan Barrow
337fdcdbc4
chore: add method comments to RVType and RVTypePtr interfaces 2024-11-16 23:52:42 -05:00
Jonathan Barrow
d3b7a0175f
chore: make CopyRef do safer, full, copies 2024-11-16 23:48:42 -05:00
Jonathan Barrow
fb784e4e4f
Merge branch 'types-updates' of https://github.com/PretendoNetwork/nex-go into types-updates 2024-11-16 10:20:20 -05:00
Jonathan Barrow
b36470e680
feat: add CopyRef and Deref methods to RVType(Ptr) 2024-11-16 10:16:37 -05:00
Jonathan Barrow
37d01ad3d7
Merge branch 'master' into types-updates 2024-07-07 17:28:22 -04:00
Jonathan Barrow
a035545093
Merge pull request #70 from wolfendale/performance-tweaks 2024-07-07 13:55:06 -04:00
Michael Wolfendale
feee2dd599
fix: allocate buffers for incoming packets 2024-07-07 16:36:34 +01:00
Michael Wolfendale
4fab7a2c86
fix: fix kerberos key derivation 2024-07-07 16:36:34 +01:00
Jonathan Barrow
4fbbe2da25
chore: fix indentation in DeriveKerberosKey from merge 2024-07-05 13:01:58 -04:00
Jonathan Barrow
27cdd4c7e3
Merge branch 'master' into types-updates 2024-07-05 13:00:33 -04:00
Jonathan Barrow
d633dca018
Merge pull request #69 from wolfendale/performance-tweaks 2024-07-05 12:55:28 -04:00
Michael Wolfendale
22d2698cef
chore: add comment to TimeoutManager
Co-authored-by: Daniel López Guimaraes <112760654+DaniElectra@users.noreply.github.com>
2024-07-05 17:48:47 +01:00
Michael Wolfendale
ad488be838
chore: update kerberos key derivation to reduce allocations 2024-07-05 17:39:29 +01:00
Michael Wolfendale
abfca9a10d
chore: remove unnecessary goroutines 2024-07-05 17:15:17 +01:00
Michael Wolfendale
c214a2a7a5
chore: reduce buffer allocations when receiving packets 2024-07-05 16:37:52 +01:00
Michael Wolfendale
4fefb05f86
chore: limit the scope of connection locking in TimeoutManager 2024-07-05 16:37:52 +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
182418f999
feat: add struct tags to struct types 2024-07-03 23:39:23 -04:00
Jonathan Barrow
2309a6d409
Merge branch 'master' into types-updates 2024-07-03 23:26:52 -04:00
Jonathan Barrow
293c20d6be
Merge pull request #68 from wolfendale/timeout-rework 2024-07-02 12:47:24 -04:00
Michael Wolfendale
0502cc64b1
chore: renamed GetRTO to RTO to match style rules 2024-07-02 17:31:42 +01:00
Michael Wolfendale
9997fb672a
chore: rename ResendScheduler TimeoutManager 2024-07-02 17:29:28 +01:00
Michael Wolfendale
0d8506dd52
chore: updated documentation 2024-07-02 17:28:31 +01:00
Michael Wolfendale
680abd3cb0
chore: update max silence time 2024-07-02 16:54:47 +01:00
Michael Wolfendale
18380590ab
feat: rework resending packets to be more accurate 2024-07-02 16:54:47 +01:00
Daniel López Guimaraes
2b6ea02749
Merge pull request #67 from wolfendale/master 2024-06-25 23:00:43 +02:00
Michael Wolfendale
83e5157350
feat: add delay to outgoing fragmented data packets 2024-06-25 21:58:40 +01:00
Jonathan Barrow
b57adeb748
refactor: remove references to "Primitive" naming conventions 2024-06-16 11:52:39 -04:00
Daniel López Guimaraes
090cfb5568
Merge pull request #65 from wolfendale/connection-state-checks
Connection State Changes
2024-06-14 22:29:19 +02:00
Jonathan Barrow
a4b341dab5
chore(types): update Godoc comment on StationURL.URL 2024-06-13 10:40:31 -04:00
Jonathan Barrow
1bee30dc05
chore: update test secure server StationURL 2024-06-13 10:38:22 -04:00
Jonathan Barrow
a1ca41e880
fix(types): add address and port validation in StationURL 2024-06-13 10:37:45 -04:00