01: package vicazh.hyperpool.stream.net.socks;
02:
03: import java.io.*;
04: import java.net.*;
05: import vicazh.hyperpool.stream.*;
06:
07: class InConnection extends Connection {
08: private Socket socket;
09:
10: InConnection(Element element, Socket socket) {
11: super (element);
12: this .socket = socket;
13: }
14:
15: public void setClient(OutputStream outputstream) throws IOException {
16: super .setClient(new InClientStream(this , outputstream));
17: }
18:
19: public void setServer(OutputStream outputstream) {
20: setServer(new InServerStream(this , outputstream,
21: new vicazh.hyperpool.stream.net.Socket(socket)));
22: }
23:
24: public void close() {
25: try {
26: socket.close();
27: } catch (Exception e) {
28: }
29: super.close();
30: }
31:
32: }
|