Jonathan Barrow
0801d7539c
Added Equals method to StructureInterface and required types
2023-05-21 17:32:48 -04:00
Jonathan Barrow
63f6a23cce
Added Copy method to StructureInterface and required types
2023-05-21 17:20:07 -04:00
Jonathan Barrow
b153233c91
Updated go modules
2023-05-21 17:09:30 -04:00
Jonathan Barrow
5dc71db489
Removed hierarchy tree system in favor of a single parentType field
2023-05-21 17:09:10 -04:00
Jonathan Barrow
771e66e9f2
Merge pull request #28 from DaniElectra/dataholder
...
Fix various DataHolder issues
2023-05-21 16:10:57 -04:00
Daniel López Guimaraes
031f69c87b
Fix various DataHolder issues
...
While the hierarchy implementation from #27 works in some cases, it
has two problems:
- It only works for NEX version <3.5, as we aren't writing the stucture
header. This isn't exactly a problem of the PR, as it was already
wrong.
- It only checks for one layer of hierarchy, because there is no
recursion applied.
Solve this by using `WriteStructure()` instead of getting the raw bytes,
since the object data is already a `StructureInterface`.
On `ExtractFromStream()` there is no need to use reflect as the object
data will be the correct structure. Using reflect also breaks with
hierarchy for unknown reasons, so just pass the dataType to
`ReadStructure()`.
Also fix a bug where the data holder is written twice when calling
`WriteDataHolder()` because of reusing the same stream on
`dataHolder.Bytes()`.
2023-05-21 14:58:55 +01:00
Jonathan Barrow
05fa2c0ae7
Merge pull request #27 from shutterbug2000/dataholder-hierarchy
...
Add Hierarchy handling to DataHolder
2023-05-21 01:28:20 -04:00
shutterbug2000
bdf790db45
Add Hierarchy handling to DataHolder
2023-05-21 00:26:05 -05:00
Jonathan Barrow
e4f02878e7
Merge pull request #26 from shutterbug2000/station-url-change
2023-05-20 09:45:29 -04:00
shutterbug2000
6590659477
Store both session URLs on the Client object
...
This removes the need for a DB to handle this
2023-05-20 03:42:53 -05:00
Jonathan Barrow
41568c0d6f
Merge pull request #25 from DaniElectra/hierarchy
2023-05-19 22:37:53 -04:00
Daniel López Guimaraes
4276ce2967
Revert hierarchy on nex.Structure
...
The value is private so it can't be edited.
2023-05-19 21:22:13 +01:00
Daniel López Guimaraes
f6cb847021
Write structure hierarchy on WriteStructure
...
Also add hierarchy to nex.Structure and rename class to parent on
ReadStructure.
2023-05-19 21:05:59 +01:00
Jonathan Barrow
9c78ebcef9
Merge pull request #24 from DaniElectra/hpp
...
Add HPP protocol support
2023-04-23 14:15:11 -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
71534efa19
Added methods to Standard to get standard time values
2023-04-11 22:34:09 -04:00
Jonathan Barrow
6fb5c7d0f0
Added default NEX version to all servers
2023-04-10 22:32:12 -04:00
Jonathan Barrow
8fe373c2b1
Added type check to DataHolder reading
2023-04-10 22:26:07 -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
d65b2f2d4c
Added Station URL methods to StreamIn
2023-04-07 19:35:34 -04:00
Jonathan Barrow
ebc095e782
Added generic StreamIn::ReadListStructure
2023-04-07 19:32:45 -04: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
67e64f3fe7
Merge pull request #22 from hauntii/feature-write-date-time
...
Add WriteDateTime for clarity
2023-04-02 00:05:02 -04:00
light
127f685036
Add WriteDateTime for clarity
2023-04-01 17:02:22 -04:00
Jonathan Barrow
21416aab1c
Added BE for uint32 and uint64 on StreamIn
2023-03-30 00:52:33 -04:00
Jonathan Barrow
935836805e
Merge branch 'master' of https://github.com/PretendoNetwork/nex-go
2023-03-26 12:29:26 -04:00
Jonathan Barrow
44f40a5dbf
Merge pull request #21 from DaniElectra/rmcrequest
...
Fix RMCRequest parameters
2023-03-26 12:27:50 -04:00
Jonathan Barrow
aa7f415a24
Acknowledge disconnect packet 3 times
2023-03-25 20:55:58 -04:00
Daniel López Guimaraes
c7ce81502e
Fix RMCRequest parameters
...
Don't use a fixed value to get the parameters, as a custom ID can extend
the header size and cause issues when reading the parameters. Get the
offset dynamically instead.
2023-03-25 22:56:46 +00:00
Jonathan Barrow
cc21f763bb
Merge pull request #20 from PretendoNetwork/chore-linting-updates
...
Fixed linking issues
2023-01-02 14:21:43 -05:00
Jonathan Barrow
dfbab77c47
Removed unnecessary nil checks for v0 packet payloads
2023-01-01 14:02:27 -05:00
Jonathan Barrow
55ad872c07
Added ReadDataHolder error check
2023-01-01 14:01:19 -05: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
914d8dd667
Removed unused hierarchy from RVConnectionData
2023-01-01 13:53:45 -05:00
Jonathan Barrow
b010f6d2aa
Fixed all incorrect Godoc comments
2023-01-01 13:51:53 -05:00
Jonathan Barrow
a466103550
Unexport InitErrorsData
2023-01-01 13:47:27 -05:00
Jonathan Barrow
bc9dd4601b
Changed ErrorsStruct to nexerrors and unexport
2023-01-01 13:46:52 -05:00
Jonathan Barrow
32d0632ab3
Added all missing Godoc comments
2023-01-01 13:45:06 -05:00
Jonathan Barrow
e7d991fafc
Fixed all naming convention issues
2023-01-01 13:30:45 -05:00
Jonathan Barrow
48d90055bb
Removed unused Client struct properties
2022-12-31 17:37:43 -05:00
Jonathan Barrow
b25f1d040b
rename RC4Key -> key
2022-12-31 17:36:18 -05:00
Jonathan Barrow
6be86dec58
localStationUrl -> localStationURL
2022-12-31 17:35:22 -05:00
Jonathan Barrow
7523648ecb
Added golangci-lint config for aggregated linting
2022-12-31 13:16:55 -05:00