Network messaging API has been changed to provide message streams.
This allows protobuf objects to be serialized over the network much more easily and flexibly.
The client asio calls were made asynchronous, this ties in with how the messaging system now works, and might improve performance slightly.
TCP sockets get the "no delay" option, this reduces jitter and possible latency
ProtoLoad and friends get their own file in common, as it's facilities were duplicated in at least three different places, some with more buggy implementations than others.
new Lua callback API on server for client connected/disconnected events, with ability to reject connections.
improved Lua "print" binding to support multiple arguments
general cleanup and use of spdlog instead of (cout/cerr/printf)
new test suite for messaging API
The primary message sending API is based around tec::networking::MessageOut and tec::networking::MessageIn
These are psudo stream objects which can be used with protobuf's ZeroCopyStream API
This reduces the complexity of writing or parsing messages and nicely abstracts it away.
Motivation and Context
The new messaging features allow unconstrained streaming of entities and state updates
The new Lua API adds the ability for the server to implement whitelists/blacklists of IPs
How Has This Been Tested?
A new set of decent unit tests cover most of the core messaging API
multiclient "play" testing with temporary trace code helped to develop and debug the test suite
more limiting message fragment size was used to exercise the message splitting functions
the Lua features were tested manually
direct debugging of problem code
Types of changes
[x] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[x] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
[x] My code follows the code style of this project.
[x] My change requires a change to the documentation.
Description
Network messaging API has been changed to provide message streams. This allows protobuf objects to be serialized over the network much more easily and flexibly.
The client asio calls were made asynchronous, this ties in with how the messaging system now works, and might improve performance slightly.
TCP sockets get the "no delay" option, this reduces jitter and possible latency
ProtoLoad and friends get their own file in
common
, as it's facilities were duplicated in at least three different places, some with more buggy implementations than others.new Lua callback API on server for client connected/disconnected events, with ability to reject connections.
improved Lua "print" binding to support multiple arguments
general cleanup and use of spdlog instead of (cout/cerr/printf)
new test suite for messaging API
The primary message sending API is based around
tec::networking::MessageOut
andtec::networking::MessageIn
These are psudo stream objects which can be used with protobuf's ZeroCopyStream API This reduces the complexity of writing or parsing messages and nicely abstracts it away.Motivation and Context
The new messaging features allow unconstrained streaming of entities and state updates
The new Lua API adds the ability for the server to implement whitelists/blacklists of IPs
How Has This Been Tested?
Types of changes
Checklist: