コード例 #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");
     }
   }
 }
コード例 #2
0
 @Override
 public InetAddress getInetAddress() {
   if (inner.isConnected()) {
     try {
       return InetAddress.getByName("localhost");
     } catch (UnknownHostException e) {
       return null;
     }
   }
   return null;
 }
コード例 #3
0
 @Override
 public boolean isConnected() {
   return inner.isConnected();
 }