1 19 package org.lucane.proxy; 20 21 import org.lucane.common.net.ObjectConnection; 22 23 27 public class Forwarder 28 extends Thread  29 { 30 ObjectConnection read; 31 ObjectConnection write; 32 33 36 public Forwarder(ObjectConnection read, ObjectConnection write) 37 { 38 this.read = read; 39 this.write = write; 40 } 41 42 46 public void run() 47 { 48 try 49 { 50 while(true) 51 { 52 write.write(read.read()); 53 } 54 55 } 56 catch(Exception e) 57 { 58 read.close(); 59 write.close(); 60 } 61 } 62 } 63 | Popular Tags |