Mercurial > hg > Members > nobuyasu > tightVNCProxy
view src/myVncProxy/AcceptThread.java @ 168:f7f4c3fdbbea
update
author | one |
---|---|
date | Sat, 10 Sep 2011 04:11:30 +0900 |
parents | df68f1f9034d |
children | 134deb9f8148 |
line wrap: on
line source
package myVncProxy; 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; int port; AcceptThread(MyRfbProto _rfb) { rfb = _rfb; } AcceptThread(MyRfbProto _rfb, int p) { rfb = _rfb; port = p; } public void run() { rfb.selectPort(port); 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); } } } }