Closed follower closed 9 years ago
I'd probably put documentation for server api described above once it's ready
Thanks for the merges of my other PRs.
Realise the server functionality is "in progress" but thought a little documentation might help for the next person like me that ends up here after finding this is the only current node.js VNC/RFB server implementation. :)
FWIW, I've updated the current example to have a quick demo of an updating display: https://github.com/follower/node-rfb2/blob/feature-update-display/rfbserver.js#L198 It only displays random coloured "static" currently but shows how it can be done.
Contemplated creating a server API but figured you would probably have plans in that direction and I don't really require much for my purposes which is essentially only producing a proof-of-concept hack. :)
Thanks for your work on this. :)
I really don't know when I'll be able to implement server the way I want, so feel free to play with it. The direction I'd like to take: be low level (allow to drop connection at any stage, send fake/incorrect handshake etc). See implementation of mysql server for example: https://github.com/sidorares/node-mysql2#mysql-server-api - one handler for each connection, RFB specific client events and helpers on connection object to send server->client messages. I'll review current server once again but now I feel it's to limiting (only exposes "client asked for update" event and all handshake/configuration values hardcoded)
"rfbserver.js" right now is more an example of how would you implement server from scratch. I'd like to make it an actual useable library with api like this: