void reset() throws IOException {
   if (fd != null || fd1 != null) {
     socketClose();
   }
   fd = null;
   fd1 = null;
   super.reset();
 }
 /**
  * Creates a socket with a boolean that specifies whether this is a stream socket (true) or an
  * unconnected UDP socket (false).
  */
 protected synchronized void create(boolean stream) throws IOException {
   fd1 = new FileDescriptor();
   try {
     super.create(stream);
   } catch (IOException e) {
     fd1 = null;
     throw e;
   }
 }
 /**
  * Binds the socket to the specified address of the specified local port.
  *
  * @param address the address
  * @param port the port
  */
 protected synchronized void bind(InetAddress address, int lport) throws IOException {
   super.bind(address, lport);
   if (address.isAnyLocalAddress()) {
     anyLocalBoundAddr = address;
   }
 }