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