Mercurial > hg > Members > nobuyasu > tightVNCProxy
annotate 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 |
rev | line source |
---|---|
24 | 1 package myVncProxy; |
23 | 2 import java.net.BindException; |
10 | 3 import java.net.Socket; |
4 import java.io.IOException; | |
5 | |
6 public class acceptThread implements Runnable { | |
7 MyRfbProto rfb; | |
8 | |
9 acceptThread(MyRfbProto _rfb) { | |
10 rfb = _rfb; | |
11 } | |
12 | |
23 | 13 |
10 | 14 public void run() { |
23 | 15 rfb.selectPort(); |
16 | |
10 | 17 while (true) { |
18 try { | |
19 Socket newCli = rfb.accept(); | |
20 rfb.sendInitData(newCli); | |
21 rfb.addSock(newCli); | |
22 } catch (IOException e) { | |
23 | |
24 } | |
25 } | |
26 } | |
27 } |