Commit graph

60 commits

Author SHA1 Message Date
Jonathan Barrow
8a4a2aedba
Added missing error checks 2023-06-07 23:18:05 -04:00
Jonathan Barrow
0c4508e64f
All relevant methods now return errors, and all errors are now checked 2023-06-07 23:12:13 -04:00
Daniel López Guimaraes
a97e9e6b19
Add getter for PasswordFromPIDFunction
This allows the common authentication protocol to reuse this function
and avoid confusion.
2023-04-23 18:05:19 +01:00
Daniel López Guimaraes
98fc727028
Add HPP protocol support
Implement an HTTP server that supports HPP requests, and add a fake
packet `HPPPacket` that allows interaction with existing code.

The `RMCResponse` won't write the protocol ID bytes if it's set to zero.
This allows support for HPP, as the RMC responses of this protocol don't
include the protocol ID.
2023-04-23 16:00:28 +01:00
Jonathan Barrow
0b5e809431
Merge pull request #23 from PretendoNetwork/kick-all
KickAll command + "graceful" kick
2023-04-15 22:49:34 -04:00
shutterbug2000
b1d7004d6b remove stray version assignment 2023-04-15 21:41:12 -05:00
Jonathan Barrow
6fb5c7d0f0
Added default NEX version to all servers 2023-04-10 22:32:12 -04:00
shutterbug2000
a50ff5b21c Set correct version for packets (oops lol) 2023-04-09 23:42:09 -05:00
shutterbug2000
3fcc1d44c7 Seperate kick methods for graceful and timeout 2023-04-09 23:24:05 -05:00
shutterbug2000
3c7a22f99c KickAll command + "graceful" kick 2023-04-09 02:44:51 -05:00
Jonathan Barrow
cd950eff9e
More consistent PRUDP method naming 2023-04-05 19:31:00 -04:00
Jonathan Barrow
86eb9b08e0
Removed SetNexVersion and added methods for setting specific NEX protocol versions 2023-04-05 19:28:18 -04:00
Jonathan Barrow
aa7f415a24
Acknowledge disconnect packet 3 times 2023-03-25 20:55:58 -04:00
Jonathan Barrow
252726d5e3
Added WriteToUDP error check 2023-01-01 13:58:25 -05:00
Jonathan Barrow
7afc45a760
Removed additional type assertions in server.Emit method 2023-01-01 13:55:16 -05:00
Jonathan Barrow
3efe2d90b8
Added godoc package comment 2022-12-31 11:21:52 -05:00
shutterbug2000
8a5d8d23eb Fix connection issues in Splatoon. 2022-09-17 06:58:53 +00:00
Jonathan Barrow
7ee7af5f38
Disconnect lingering connections 2022-09-11 14:55:31 -04:00
Jonathan Barrow
bb6d6348b0
Removed duplicate code in V1 ACK encoding 2022-09-05 09:51:38 -04:00
Jonathan Barrow
95ecd962f0
Remove event handler type assertion 2022-09-05 09:48:11 -04:00
Jonathan Barrow
4bb09fd0ea
Track client PRUDP minor version and supported functions 2022-09-05 09:45:36 -04:00
Jonathan Barrow
52b2001c00
Removed useless line breaks 2022-09-05 09:11:55 -04:00
Jonathan Barrow
d62f77a58f
Added (Set)SupportedFunctions methods 2022-09-05 09:08:54 -04:00
Jonathan Barrow
003b4c2baa
Added (Set)PRUDPProtocolMinorVersion methods and corrected misuse of server NEX version 2022-09-05 08:57:56 -04:00
Jonathan Barrow
3f91013496 Added kerberos password field 2022-04-16 19:58:00 -04:00
Jonathan Barrow
655d59f4ae Added plogger logging 2022-04-15 16:51:05 -04:00
Jonathan Barrow
0f54daac27 Removed unused code found only in the original Rendez-Vous library 2022-04-10 16:07:00 -04:00
Jonathan Barrow
7790a5e23a Added kerberos ticket version 2022-04-03 10:00:47 -04:00
Jonathan Barrow
8be2d8bca2 Moved all source files back to root 2022-03-29 00:15:55 -04:00
Jonathan Barrow
a2d673a235 Moving to Go modules 2022-03-27 19:59:17 -04:00
Jonathan Barrow
19520fa349 Merge branch 'master' of https://github.com/PretendoNetwork/nex-go 2021-12-02 09:07:20 -05:00
shutterbug2000
64b6ab825f
Fix prudp fragment issues
Fixes friends failing to load when the friend list gets too long
2021-12-01 00:48:10 -06:00
Jonathan Barrow
af513d18c0 Moved connection ID counter to nex-go 2021-11-21 20:55:45 -05:00
Jonathan Barrow
47a0b52b7f Added SetFragmentSize 2021-11-21 00:53:15 -05:00
Jonathan Barrow
4fc1ab819c moved ping timeout timer ti Go Timer channel 2021-11-18 08:43:20 -05:00
Jonathan Barrow
13ee75a2bb Added a ping timeout 2021-11-02 10:59:58 -04:00
Jonathan Barrow
c5ce72ce26 remove redundant SendPing 2021-11-02 10:04:28 -04:00
Jonathan Barrow
7462a7f43f Added FindClientFromPID 2021-10-28 09:06:21 -04:00
Jonathan Barrow
24a4f22d93 use fragmentID 2021-09-29 19:16:38 -04:00
Jonathan Barrow
caecee00e9 removed commented code and whitespace 2021-08-22 18:29:58 -04:00
Jonathan Barrow
f78cd960d8 Changed getters to be more Go-like
Removed "Get" prefix from getters to conform to effective Go standards
2020-04-19 21:40:04 -04:00
Jonathan Barrow
49762a9957 Renamed nexMinorVersion
Renamed nexMinorVersion since NEX versions are more specific in reality
2020-04-19 21:32:02 -04:00
Jonathan Barrow
3469a4893a Moved unreachable code 2020-04-19 12:01:43 -04:00
Jonathan Barrow
1d690de84d New StreamOut API
StreamOut now has an abstraction layer to clean up some method calls from crunch
2020-02-16 17:42:03 -05:00
Jonathan Barrow
e1d1dfe90a Removed broken pings and fixed client state reuse
Ping packets were never being sent from the server. This is now fixed. Also removed the buggy StartPing loop, which never worked due to struct properties not being updated in different goroutine threads. Ping packets now get sent from the server whenever one is sent from the client

Client states were also being reused when a connection was made with an existing port on the same console, which broke NNID switching. Client states now get reset when connections begin
2020-02-16 16:48:54 -05:00
Jonathan Barrow
5bfbd6ee09 Made server more concurrent
Server should now be able to handle concurrent connections from more clients
2020-01-31 23:18:26 -05:00
Jonathan Barrow
82c62bc806 Added ping timeout check 2020-01-31 13:08:37 -05:00
Jonathan Barrow
c124c9a204 Added Kick method to server and disconnect kicking 2020-01-31 03:28:06 -05:00
Jonathan Barrow
17208659c4 Error handling and data validation
Now validates data before passing it to crunch in order to avoid buffer read/write out of bounds panics. This API update is breaking and all code using it will need to be updated
2020-01-31 02:50:23 -05:00
Jonathan Barrow
8ab25b0f16 new stream implementation and Structure type handling
Split the Stream struct into 2 separate stream types for clearer intent. Also now pass them a reference to the server pointer to access server config (namely the NEX minor version)

Structure NEX types are now being implemented (a push to nex-protocols-go will follow shortly). However the implementation is pretty jank and could use some work. Currently uses emulated inheritance
2020-01-26 21:38:33 -05:00