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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
24
87b29d6039a6 add package myVncProxy
e085711
parents: 23
diff changeset
1 package myVncProxy;
23
b51bb7bc0766 test update
e085711
parents: 10
diff changeset
2 import java.net.BindException;
10
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
3 import java.net.Socket;
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
4 import java.io.IOException;
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
5
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
6 public class acceptThread implements Runnable {
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
7 MyRfbProto rfb;
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
8
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
9 acceptThread(MyRfbProto _rfb) {
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
10 rfb = _rfb;
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
11 }
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
12
23
b51bb7bc0766 test update
e085711
parents: 10
diff changeset
13
10
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
14 public void run() {
23
b51bb7bc0766 test update
e085711
parents: 10
diff changeset
15 rfb.selectPort();
b51bb7bc0766 test update
e085711
parents: 10
diff changeset
16
10
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
17 while (true) {
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
18 try {
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
19 Socket newCli = rfb.accept();
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
20 rfb.sendInitData(newCli);
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
21 rfb.addSock(newCli);
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
22 } catch (IOException e) {
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
23
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
24 }
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
25 }
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
26 }
2840c7a259f1 add acceptThread
e085711
parents:
diff changeset
27 }