ruby-vnc
ruby-vnc copied to clipboard
Add helpers to read/write in same language as spec
Used the vocabulary from https://tools.ietf.org/html/rfc6143
It makes it very easy to read/write following the RFC6143, and we don't have to think about pack/unpack.
Work in progress.
Seems fine to me, though the read/write naming seems slightly counter-intuitive as nothing is read/written. Seems all of the callers here and in your later commits are of the form socket.write(writeXX(...)) or readXX(socket.read(N)) (requiring matching N to XX at each call site). What do you think about having these methods do the actual socket io?
@aquasync That's fair, I have some more changes planned, so I will try to think about how I can do this better without breaking the current API.