view src/myVncProxy/acceptThread.java @ 24:87b29d6039a6

add package myVncProxy
author e085711
date Sun, 24 Apr 2011 23:03:00 +0900 (2011-04-24)
parents src/acceptThread.java@b51bb7bc0766
children cded9fd297ab
line wrap: on
line source
package myVncProxy;
import java.net.BindException;
import java.net.Socket;
import java.io.IOException;

public class acceptThread implements Runnable {
	MyRfbProto rfb;

	acceptThread(MyRfbProto _rfb) {
		rfb = _rfb;
	}


	public void run() {
		rfb.selectPort();
		
		while (true) {
			try {
				Socket newCli = rfb.accept();
				rfb.sendInitData(newCli);
				rfb.addSock(newCli);
			} catch (IOException e) {

			}
		}
	}
}