view src/myVncProxy/RequestScreenThread.java @ 188:d69a89f6d14a

Create BroadCast.java and GetBroadCast.java
author one
date Tue, 22 Nov 2011 13:37:38 +0900
parents 13458f88d8c9
children
line wrap: on
line source

package myVncProxy;

public class RequestScreenThread implements Runnable {
	MyRfbProto rfb;

	RequestScreenThread(MyRfbProto _rfb) {
		rfb = _rfb;
	}

	public void run() {
		while (true) {
			try {
				waitThread();
				Thread.sleep(3000);
				rfb.writeFramebufferUpdateRequest(0, 0, rfb.framebufferWidth,
						rfb.framebufferHeight, false);

			} catch (Exception e) {
				e.printStackTrace();
				break;
			}
		}
	}
	
    public synchronized void waitThread() {
    	try{
    		wait();
        }catch(InterruptedException e) {
        	e.printStackTrace();
    	}
    }

    public synchronized void reStart() {
    	notify();
    }
    
    
}