Mercurial > hg > Members > nobuyasu > tightVNCClient
comparison src/myVncClient/AcceptThread.java @ 53:96efd303d081
change name AcceptThread
author | Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 28 Jul 2011 13:34:36 +0900 |
parents | |
children | c9ef47d9aa55 |
comparison
equal
deleted
inserted
replaced
52:1d382eedc2b1 | 53:96efd303d081 |
---|---|
1 package myVncClient; | |
2 import java.net.Socket; | |
3 import java.io.IOException; | |
4 import java.io.InputStream; | |
5 import java.io.OutputStream; | |
6 | |
7 import myVncClient.MyRfbProto; | |
8 | |
9 public class acceptThread implements Runnable { | |
10 MyRfbProto rfb; | |
11 byte[] imageBytes; | |
12 | |
13 acceptThread(MyRfbProto _rfb ) { | |
14 rfb = _rfb; | |
15 } | |
16 public void run() { | |
17 rfb.selectPort(); | |
18 while (true) { | |
19 try { | |
20 Socket newCli = rfb.accept(); | |
21 | |
22 OutputStream os = newCli.getOutputStream(); | |
23 InputStream is = newCli.getInputStream(); | |
24 rfb.newClient(this, newCli, os, is); | |
25 } catch (IOException e) { | |
26 e.printStackTrace(); | |
27 System.out.println(e); | |
28 } | |
29 } | |
30 } | |
31 } |