comparison src/myVncProxy/MyRfbProto.java @ 151:db5f735fd2b4

add xml-rpc.jar
author e085711
date Sat, 10 Sep 2011 04:13:50 +0900
parents c1d7d4fbcfb9
children fb1a62154851 4fca6f516880
comparison
equal deleted inserted replaced
147:a2b5149bbbe6 151:db5f735fd2b4
365 } 365 }
366 366
367 367
368 void sendDataToClient() throws Exception { 368 void sendDataToClient() throws Exception {
369 regiFramebufferUpdate(); 369 regiFramebufferUpdate();
370 // printFramebufferUpdate(); 370 printFramebufferUpdate();
371 int dataLen = checkAndMark(); 371 int dataLen = checkAndMark();
372 readSendData(dataLen); 372 readSendData(dataLen);
373 } 373 }
374 374
375 BufferedImage createBufferedImage(Image img) { 375 BufferedImage createBufferedImage(Image img) {
607 int encoding = header.getInt(12); 607 int encoding = header.getInt(12);
608 if (encoding==RfbProto.EncodingZRLE||encoding==RfbProto.EncodingZlib) { // ZRLEE is already recompressed 608 if (encoding==RfbProto.EncodingZRLE||encoding==RfbProto.EncodingZlib) { // ZRLEE is already recompressed
609 ByteBuffer len = ByteBuffer.allocate(4); 609 ByteBuffer len = ByteBuffer.allocate(4);
610 readFully(len.array(),0,4); len.limit(4); 610 readFully(len.array(),0,4); len.limit(4);
611 ByteBuffer inputData = ByteBuffer.allocate(dataLen-20); 611 ByteBuffer inputData = ByteBuffer.allocate(dataLen-20);
612
613 startTiming();
612 readFully(inputData.array(),0,inputData.capacity()); inputData.limit(dataLen-20); 614 readFully(inputData.array(),0,inputData.capacity()); inputData.limit(dataLen-20);
615 stopTiming();
616
613 LinkedList<ByteBuffer>inputs = new LinkedList<ByteBuffer>(); 617 LinkedList<ByteBuffer>inputs = new LinkedList<ByteBuffer>();
614 inputs.add(inputData); 618 inputs.add(inputData);
615 619
616 header.putInt(12, RfbProto.EncodingZRLEE); // means recompress every time 620 header.putInt(12, RfbProto.EncodingZRLEE); // means recompress every time
617 // using new Deflecter every time is incompatible with the protocol, clients have to be modified. 621 // using new Deflecter every time is incompatible with the protocol, clients have to be modified.