Mercurial > hg > Members > nobuyasu > tightVNCProxy
comparison src/myVncProxy/acceptThread.java @ 65:5fca2bb52dc7
create checkMillis
author | e085711 |
---|---|
date | Fri, 22 Jul 2011 03:21:56 +0900 |
parents | 4864a7d1df00 |
children |
comparison
equal
deleted
inserted
replaced
63:4864a7d1df00 | 65:5fca2bb52dc7 |
---|---|
1 package myVncProxy; | 1 package myVncProxy; |
2 import java.net.ServerSocket; | 2 |
3 import java.net.Socket; | 3 import java.net.Socket; |
4 import java.io.IOException; | 4 import java.io.IOException; |
5 import java.io.InputStream; | 5 import java.io.InputStream; |
6 import java.io.OutputStream; | 6 import java.io.OutputStream; |
7 | 7 |
8 public class acceptThread implements Runnable { | 8 public class acceptThread implements Runnable { |
9 MyRfbProto rfb; | 9 MyRfbProto rfb; |
10 byte[] imageBytes; | 10 byte[] imageBytes; |
11 | 11 |
12 acceptThread(MyRfbProto _rfb ) { | 12 acceptThread(MyRfbProto _rfb) { |
13 rfb = _rfb; | 13 rfb = _rfb; |
14 } | 14 } |
15 | |
15 public void run() { | 16 public void run() { |
16 rfb.selectPort(); | 17 rfb.selectPort(); |
17 while (true) { | 18 while (true) { |
18 try { | 19 try { |
19 Socket newCli = rfb.accept(); | 20 Socket newCli = rfb.accept(); |
20 | 21 |
21 OutputStream os = newCli.getOutputStream(); | 22 OutputStream os = newCli.getOutputStream(); |
22 InputStream is = newCli.getInputStream(); | 23 InputStream is = newCli.getInputStream(); |
23 rfb.newClient(this, newCli, os, is); | 24 rfb.newClient(this, newCli, os, is); |
24 } catch (IOException e) { | 25 } catch (IOException e) { |
25 e.printStackTrace(); | 26 e.printStackTrace(); |
26 System.out.println(e); | 27 System.out.println(e); |
27 } | 28 } |
28 } | 29 } |
29 } | 30 } |
30 } | 31 } |
31 |