Code example for InetSocketAddress

Methods: toString

0
    this(new InetSocketAddress(port), clientTimeout);
    port_ = port;
  }   
 
  public TNonblockingServerSocket(InetSocketAddress bindAddr) throws TTransportException {
    this(bindAddr, 0);
  } 
 
  public TNonblockingServerSocket(InetSocketAddress bindAddr, int clientTimeout) throws TTransportException {
    clientTimeout_ = clientTimeout;
    try { 
      serverSocketChannel = ServerSocketChannel.open();
      serverSocketChannel.configureBlocking(false);
 
      // Make server socket 
      serverSocket_ = serverSocketChannel.socket();
      // Prevent 2MSL delay problem on server restarts 
      serverSocket_.setReuseAddress(true);
      // Bind to listening port 
      serverSocket_.bind(bindAddr);
    } catch (IOException ioe) {