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
64b28c3b02
Fixed StreamIn.ReadMap using the key function twice
2023-07-24 15:02:45 -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
81594ad489
Added all missing Stream read/write methods for number types
2023-06-09 12:53:57 -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
Jonathan Barrow
3166aa974c
Added structure version to structure type
2023-06-07 13:41:15 -04:00
Daniel López Guimaraes
39045e2650
Revert ReadMap() to original implementation
...
And reimplement WriteMap() with less arguments.
2023-06-06 15:52:36 +01:00
Daniel López Guimaraes
062470d47a
Implement ReadMap() and WriteMap()
...
Maps were not completely implemented before and we only had the ability
to read them from streams. In order to support every stream type on
maps, let the user define the read or write function to call for the key
and value.
Since we have to allow every fucnction type, pass the functions as
`interface{}` and call them using reflect. Note that ReadMap() currently
does not support every stream type, like structures, because we would
have to get the structure we want to read and pass it as an argument
when making the call.
2023-06-05 20:11:38 +01:00
Daniel López Guimaraes
6eac68ab1a
Add Bytes() to Variant and minor changes
...
In order to implement the stream properly, add ReadFloat64LE() to
StreamIn and other required functions for the Variant.
2023-06-05 20:09:31 +01:00
Daniel López Guimaraes
92116b2857
Use structure.Copy() instead of reflect
...
Also use Copy() upon reading data holders.
2023-05-27 23:12:32 +01:00
Jonathan Barrow
4113d234a0
Added a real Variant type and updated StreamIn.ReadVariant
2023-05-21 23:41:42 -04:00
Jonathan Barrow
5dc71db489
Removed hierarchy tree system in favor of a single parentType field
2023-05-21 17:09:10 -04: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
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
86eb9b08e0
Removed SetNexVersion and added methods for setting specific NEX protocol versions
2023-04-05 19:28:18 -04:00
Jonathan Barrow
21416aab1c
Added BE for uint32 and uint64 on StreamIn
2023-03-30 00:52:33 -04:00
Jonathan Barrow
55ad872c07
Added ReadDataHolder error check
2023-01-01 14:01:19 -05:00
Jonathan Barrow
eef299b0bf
Corrected structure header check
2022-09-05 08:59:53 -04:00
Jonathan Barrow
35414b9219
Added better DataHolder type handling
2022-05-09 10:21:30 -04:00
Jonathan Barrow
ac36d78a22
Added StreamIn.ReadDateTime
2022-04-17 22:01:00 -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
9ee262532c
Added signed methods
2021-11-12 00:31:14 -05:00
shutterbug2000
74456b629b
ReadBool for StreamIn
2021-10-15 09:23:26 +01:00
Jonathan Barrow
44a7a69ac5
ReadListQBuffer
2021-10-01 21:35:01 -04:00
Jonathan Barrow
3cc36373a6
Added StreamIn.ReadListString
2021-08-22 18:30:20 -04:00
Jonathan Barrow
25e1297b17
Add variant reading and basic map reading
...
Added reading of variant types and just enough of the map type to get read MatchmakeParam
2020-04-20 19:34:00 -04:00
Jonathan Barrow
2c77b483c9
Exported stream server
2020-04-19 22:54:47 -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
f90728baa9
Revert "remove usage of reflect. improve efficiency. don't use abstracted methods internally. add go module support"
...
This reverts commit 75511a1ecb
.
2020-04-17 13:16:03 -04:00
superwhiskers
75511a1ecb
remove usage of reflect. improve efficiency. don't use abstracted methods internally. add go module support
2020-04-06 20:42:26 -05:00
Jonathan Barrow
4021d2c32f
Added basic list reading/writing support to streams
...
Streams now have basic methods for reading and writing lists of all number types as well as writing a list of Structure types. Reading Structure types is currently done by the protocol lib where those types are defined
2020-03-17 21:44:07 -04:00
Jonathan Barrow
122938e712
Change StreamIn method names to match StreamOut
...
Streams are not an abstraction rather than an extension of crunch, so we now use our own naming convention
2020-02-16 17:43:59 -05:00
Jonathan Barrow
667f4a07e9
New StreamIn API
...
StreamIn now has an abstraction layer to clean up some method calls from crunch
2020-02-16 17:18:17 -05:00
Jonathan Barrow
14a29f1b5c
Added missing export comments
2020-02-16 16:59:47 -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
ca8b98c807
bump crunch version
2020-01-29 18:18:28 -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