cabo / cbor-diag

CBOR diagnostic utilities
56 stars 10 forks source link

Adds custom error with attr for needed bytes count #1

Closed cvigano closed 9 years ago

cvigano commented 9 years ago

Utilizing the nature of CBOR to communicate the amount of bytes to read, a server implementation can use this error to implement byte-precise reads from a socket, although "byte-precise" in a socket context has to be taken with a grain of salt due to several possible instances of buffering from wire to socket to server.