Code example for InetSocketAddress

0
     * Gets the underlying socket address 
     * @return socket address 
     * @throws MongoException.Network if the host can not be resolved 
     */ 
    public InetSocketAddress getSocketAddress() throws UnknownHostException {
        return new InetSocketAddress(InetAddress.getByName(_host), _port);
    } 
 
    @Override 
    public String toString(){
        return _host + ":" + _port;
    } 
 
    final String _host;
    final int _port;
 
    // -------- 
    // static helpers 
    // -------- 
 
    /**