41
|
1 package myVncProxy;
|
|
2 import java.net.Socket;
|
|
3 import java.io.IOException;
|
|
4 import java.io.OutputStream;
|
|
5
|
|
6
|
|
7 public class SendThread implements Runnable {
|
|
8
|
|
9 Socket sock;
|
|
10 OutputStream out;
|
|
11 byte b[];
|
|
12
|
|
13 SendThread(Socket _sock, byte _b[]){
|
|
14 sock = _sock;
|
|
15 b = _b;
|
|
16 }
|
|
17 SendThread(OutputStream _out, byte _b[]){
|
|
18 out = _out;
|
|
19 b = _b;
|
|
20 }
|
|
21
|
|
22 public void run() {
|
|
23 try{
|
|
24 out.write(b, 0, b.length);
|
|
25 // sock.getOutputStream().write(b, 0, b.length);
|
|
26 }catch(IOException e){
|
|
27
|
|
28 }
|
|
29 }
|
|
30 }
|