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

add package myVncProxy
author e085711
date Sun, 24 Apr 2011 23:03:00 +0900
parents src/acceptThread.java@b51bb7bc0766
children cded9fd297ab
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/myVncProxy/acceptThread.java	Sun Apr 24 23:03:00 2011 +0900
@@ -0,0 +1,27 @@
+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) {
+
+			}
+		}
+	}
+}