view src/myVncProxy/acceptThread.java @ 65:5fca2bb52dc7

create checkMillis
author e085711
date Fri, 22 Jul 2011 03:21:56 +0900
parents 4864a7d1df00
children
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.newClient(this, newCli, os, is);
			} catch (IOException e) {
				e.printStackTrace();
				System.out.println(e);
			}
		}
	}
}