Code example for InetSocketAddress

Methods: toString

0
      serverSocket_.setReuseAddress(true);
      // Bind to listening port 
      serverSocket_.bind(bindAddr);
    } catch (IOException ioe) {
      serverSocket_ = null;
      throw new TTransportException("Could not create ServerSocket on address " + bindAddr.toString() + ".");
    } 
  } 
 
  public void listen() throws TTransportException { 
    // Make sure not to block on accept 
    if (serverSocket_ != null) {
      try { 
        serverSocket_.setSoTimeout(0);
      } catch (SocketException sx) {
        LOGGER.error("Could not set socket timeout.", sx);
      } 
    } 
  } 
 
Experience pair programming with AI  Get Codota for Java