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