view src/acceptThread.java @ 23:b51bb7bc0766

test update
author e085711
date Sun, 24 Apr 2011 16:48:39 +0900
parents 2840c7a259f1
children
line wrap: on
line source

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) {

			}
		}
	}
}