Mercurial > hg > Members > nobuyasu > tightVNCProxy
view src/myVncProxy/AcceptThread.java @ 73:6fc4272db7e2
change class name
author | Yu Taninari <e085734@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 26 Jul 2011 22:41:15 +0900 |
parents | |
children | 347c153f74c7 |
line wrap: on
line source
package myVncProxy; import java.net.ServerSocket; import java.net.Socket; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; 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); } } } }