Esempio n. 1
0
 private void setSocketOption(final SocketOptionSetter s) throws SocketException {
   if (inner.isConnected()) {
     s.run();
   } else {
     if (!optionsToSet.offer(s)) {
       throw new SocketException("Failed to queue option");
     }
   }
 }
Esempio n. 2
0
 @Override
 public InetAddress getInetAddress() {
   if (inner.isConnected()) {
     try {
       return InetAddress.getByName("localhost");
     } catch (UnknownHostException e) {
       return null;
     }
   }
   return null;
 }
Esempio n. 3
0
 @Override
 public boolean isConnected() {
   return inner.isConnected();
 }