0
|
1 package treeVnc;
|
|
2
|
|
3 import java.io.IOException;
|
|
4
|
|
5 public class RequestScreenThread implements Runnable {
|
|
6 MyRfbProtoProxy rfb;
|
|
7
|
|
8 RequestScreenThread(MyRfbProtoProxy _rfb) {
|
|
9 rfb = _rfb;
|
|
10 }
|
|
11
|
|
12 public void run() {
|
|
13 while (true) {
|
|
14 try {
|
|
15 waitThread();
|
|
16 Thread.sleep(3000);
|
|
17 rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
|
|
18 rfb.framebufferHeight, false);
|
|
19
|
|
20 } catch (Exception e) {
|
|
21 e.printStackTrace();
|
|
22 break;
|
|
23 }
|
|
24 }
|
|
25 }
|
|
26
|
|
27 public synchronized void waitThread() {
|
|
28 try{
|
|
29 wait();
|
|
30 }catch(InterruptedException e) {
|
|
31 e.printStackTrace();
|
|
32 }
|
|
33 }
|
|
34
|
|
35 public synchronized void reStart() {
|
|
36 notify();
|
|
37 }
|
|
38
|
|
39 public void checkDelay() throws IOException {
|
|
40 rfb.checkDelayData();
|
|
41 }
|
|
42
|
|
43 }
|