buf[2] = 0; // number of encodings
buf[3] = 1;
buf[4] = 0; // raw encoding
+ buf[5] = 0;
+ buf[6] = 0;
+ buf[7] = 0;
- write(vnc_sock, buf, 5);
+ write(vnc_sock, buf, 8);
// request the entire framebuffer
buf[0] = 3; // message type
// activity on VNC socket?
if (FD_ISSET(vnc_sock, &readfs)) {
- char buf[256];
+ unsigned char buf[256];
+
+ printf("Activity on VNC socket!\n");
+
read(vnc_sock, buf, 1);
switch (buf[0]) {
case 0: