Mercurial > hg > Members > nobuyasu > tightVNCClient
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/myVncClient/AcceptThread.java Thu Jul 28 13:34:36 2011 +0900 @@ -0,0 +1,31 @@ +package myVncClient; +import java.net.Socket; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; + +import myVncClient.MyRfbProto; + +public class acceptThread implements Runnable { + MyRfbProto rfb; + byte[] imageBytes; + + acceptThread(MyRfbProto _rfb ) { + rfb = _rfb; + } + public void run() { + rfb.selectPort(); + while (true) { + try { + Socket newCli = rfb.accept(); + + OutputStream os = newCli.getOutputStream(); + InputStream is = newCli.getInputStream(); + rfb.newClient(this, newCli, os, is); + } catch (IOException e) { + e.printStackTrace(); + System.out.println(e); + } + } + } +} \ No newline at end of file