protected synchronized void bind(InetAddress address,int lport) throws IOException {
synchronized (fdLock) {
    if (!closePending && (socket == null || !socket.isBound())) {
      NetHooks.beforeTcpBind(fd,address,lport);
    }
  }
  socketBind(address,lport);
  if (socket != null)   socket.setBound();
  if (serverSocket != null)   serverSocket.setBound();
}

protected synchronized void bind ( InetAddress address , int lport ) throws IOException { synchronized ( fdLock ) { if ( ! closePending && ( socket == null || ! socket . isBound ( ) ) ) { NetHooks . beforeTcpBind ( fd , address , lport ) ; } } socketBind ( address , lport ) ; if ( socket != null ) socket . setBound ( ) ; if ( serverSocket != null ) serverSocket . setBound ( ) ; }
binds the socket to the specified address of the specified local port .
