Improvements for encoding, serialization and NetworkSocket
Various improvements for the io::encoding
and io::serialization
modules. Moreover, the NetworkSocket
got a major upgrade to support large object transmission (TCP) + better error handling and overall performance.
New Features
- [io]:
-
encoding
- Now supports encoding and decoding of
SmartVector
containers - Now supports encoding and decoding of generic
Eigen::QuaternionBase
(arbitrary scalar type)
- Now supports encoding and decoding of
-
serialization
- Now supports serialization and deserialization of
std::vector
,SmartVector
,Eigen::MatrixBase
andEigen::QuaternionBase
types
- Now supports serialization and deserialization of
-
SerializableData
- Added support for
serialize(SerializableData)
anddeSerialize(SerializableData)
. This allows embeddedSerializableData
-objects in containers like arrays or vectors.
- Added support for
-
NetworkSocket
- Now supports messages >4kB for TCP connections (theoretical maximum is now 4GB)
- Now avoids overflow of TCP and UDP socket buffers (handled by OS kernel)
- Improved error handling for sending and receiving messages
- Improved constructor by dedicated container for options
-
Breaking Changes
- [io]:
-
serialization
:- Changed syntax from
serializeArray()
toserialize()
anddeSerializeArray()
todeSerialize()
- Changed syntax from
serializeString()
toserialize()
anddeSerializeString()
todeSerialize()
- Moved
SerializableData
intoserialization.hpp
(and namespaceserialization
). This is necessary to allow automatic serialization of containers like array, vector, SmartVector with the element typeSerializableData
- Changed syntax from
serialize(stream, stream)
toappend(stream, stream)
to avoid ambiguity with serialization of anstd::vector<uint8_t>
- Changed syntax from
-
NetworkSocket
- Constructor now expects a container of options (
NetworkSocketOptions
or the derived specializationsTCPServerOptions
,TCPClientOptions
,UDPSocketOptions
)
- Constructor now expects a container of options (
-
Edited by Philipp Seiwald