01: package vicazh.hyperpool.stream.net.socks;
02:
03: import java.io.*;
04: import java.net.*;
05: import vicazh.hyperpool.Start;
06:
07: public class InServerStream extends ServerStream {
08:
09: private vicazh.hyperpool.stream.net.Socket socket;
10:
11: public InServerStream(Connection connection,
12: OutputStream outputstream,
13: vicazh.hyperpool.stream.net.Socket socket) {
14: super (connection, outputstream);
15: this .socket = socket;
16: socket.stream = this ;
17: }
18:
19: public vicazh.hyperpool.stream.net.Socket getSocket() {
20: return socket;
21: }
22:
23: public boolean isReverse() {
24: InetAddress a = socket.getInetAddress();
25: boolean b = !a.isLoopbackAddress() && !a.isSiteLocalAddress();
26: Start.logger.finest("reverse:" + b);
27: return b;
28: }
29: }
|