protocol_splitter: implement with one read buffer

This is an attempt to implement the protocol_splitter with one
read buffer only. The idea is to prevent additional copy
operations from an incoming buffer to the respective protocol buffer.

Right now the benefit is not really there because we are not using a
ringbuffer and have to shift data around quite a bit.

We also try to parse and copy data to the reader immediately without
doing a read from the device which potentially takes 100ms.

We further use a timeout mechanism to prevent starvation if one reader
disconnects and the buffer would fill up from unread data.
This commit is contained in:
Julian Oes
2021-06-29 11:42:20 +02:00
committed by Nuno Marques
parent 0c9fefce32
commit cb2b09b80f
File diff suppressed because it is too large Load Diff