view src/acceptThread.java @ 10:2840c7a259f1

add acceptThread
author e085711
date Sat, 16 Apr 2011 02:21:09 +0900
parents
children b51bb7bc0766
line wrap: on
line source

import java.net.Socket;
import java.io.IOException;

public class acceptThread implements Runnable {
	MyRfbProto rfb;

	acceptThread(MyRfbProto _rfb) {
		rfb = _rfb;
	}

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

			}
		}
	}
}