Mercurial > hg > Members > nobuyasu > tightVNCProxy
view src/myVncProxy/acceptThread.java @ 63:4864a7d1df00
add CreateThread.java modify acceptClient.java and VncProxyService.java
author | Yu Taninari <e085734@ie.u-ryukyu.ac.jp> |
---|---|
date | Tue, 12 Jul 2011 13:47:32 +0900 |
parents | 796f2b3b8665 |
children | 5fca2bb52dc7 |
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); } } } }