Is it possible to abstract position and perform it on encoder/decoder object instead of io property? Its assumed that io object type would have a position implemented, but for socket types (pipe & network) it's not the case.
If I want to implement a socket-based encoder I may need to handle position requests to encoder itself which would handle some additional metadata exchange to get the message size or some terminator by wire to estimate a position within protobuf data stream.
Is it possible to abstract
position
and perform it on encoder/decoder object instead ofio
property? Its assumed thatio
object type would have aposition
implemented, but for socket types (pipe & network) it's not the case.Here is an example of a generated encoder code
If I want to implement a socket-based encoder I may need to handle position requests to encoder itself which would handle some additional metadata exchange to get the message size or some terminator by wire to estimate a position within protobuf data stream.