Mercurial > hg > Members > nobuyasu > tightVNCProxy
comparison src/ProxyVncCanvas.java @ 14:57f227139599
cui proxy
author | e085711 |
---|---|
date | Sun, 17 Apr 2011 02:16:52 +0900 |
parents | a5d73cafc8fe |
children | 89e1c5f84407 |
comparison
equal
deleted
inserted
replaced
13:a5d73cafc8fe | 14:57f227139599 |
---|---|
395 rfb.sendData(b); | 395 rfb.sendData(b); |
396 } | 396 } |
397 } | 397 } |
398 } | 398 } |
399 } | 399 } |
400 | 400 byte buffer[] = new byte[rfb.available()]; |
401 rfb.readFully(buffer); | |
402 rfb.sendData(buffer); | |
403 | |
401 count++; | 404 count++; |
402 | 405 |
406 /* | |
403 // Read message type from the server. | 407 // Read message type from the server. |
404 int msgType = rfb.readServerMessageType(); | 408 int msgType = rfb.readServerMessageType(); |
405 | 409 |
406 // Process the message depending on its type. | 410 // Process the message depending on its type. |
407 switch (msgType) { | 411 switch (msgType) { |
519 | 523 |
520 viewer.autoSelectEncodings(); | 524 viewer.autoSelectEncodings(); |
521 | 525 |
522 // Before requesting framebuffer update, check if the pixel | 526 // Before requesting framebuffer update, check if the pixel |
523 // format should be changed. | 527 // format should be changed. |
524 /* | 528 |
525 if (viewer.options.eightBitColors != (bytesPixel == 1)) { | 529 if (viewer.options.eightBitColors != (bytesPixel == 1)) { |
526 // Pixel format should be changed. | 530 // Pixel format should be changed. |
527 setPixelFormat(); | 531 setPixelFormat(); |
528 fullUpdateNeeded = true; | 532 fullUpdateNeeded = true; |
529 } | 533 } |
530 */ | 534 |
531 | 535 |
532 // Request framebuffer update if needed. | 536 // Request framebuffer update if needed. |
533 int w = rfb.framebufferWidth; | 537 int w = rfb.framebufferWidth; |
534 int h = rfb.framebufferHeight; | 538 int h = rfb.framebufferHeight; |
535 rfb.writeFramebufferUpdateRequest(0, 0, w, h, !fullUpdateNeeded); | 539 rfb.writeFramebufferUpdateRequest(0, 0, w, h, !fullUpdateNeeded); |
549 break; | 553 break; |
550 | 554 |
551 default: | 555 default: |
552 throw new Exception("Unknown RFB message type " + msgType); | 556 throw new Exception("Unknown RFB message type " + msgType); |
553 } | 557 } |
554 | 558 */ |
555 } | 559 } |
556 } | 560 } |
557 | 561 |
558 // | 562 // |
559 // Handle a raw rectangle. The second form with paint==false is used | 563 // Handle a raw rectangle. The second form with paint==false is used |