Mercurial > hg > Members > nobuyasu > tightVNCProxy
view src/myVncProxy/acceptThread.java @ 43:08317224ce21
create RFB 003.998
author | e085711 |
---|---|
date | Thu, 23 Jun 2011 07:03:21 +0900 |
parents | 03d2e5db2135 |
children | b16072ddc911 |
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; 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.sendRfbVersion(os); rfb.sendSecurityType(os); rfb.readClientInit(is); rfb.sendInitData(os); rfb.createBimgFlag = true; // rfb.addSockTmp(newCli); rfb.addSock(newCli); } catch (IOException e) { e.printStackTrace(); System.out.println(e); } } } }