kaspergrubbe / ruby-vnc

A library for interaction automation of servers via VNC
MIT License
31 stars 17 forks source link

Add helpers to read/write in same language as spec #8

Open kaspergrubbe opened 6 years ago

kaspergrubbe commented 6 years ago

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.

aquasync commented 6 years ago

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?

kaspergrubbe commented 6 years ago

@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.