Java Socket Address Get getConnString(SocketAddress address)

Here you can find the source of getConnString(SocketAddress address)

Description

get Conn String

License

Apache License

Declaration

static public String getConnString(SocketAddress address) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.net.SocketAddress;

public class Main {
    static public String getConnString(SocketAddress address) {
        String addrStr = address.toString();
        if (addrStr.contains("/")) {
            addrStr = addrStr.substring(addrStr.indexOf("/") + 1);
        }/*from  w w w . j  av a  2s  .  c  o m*/
        return addrStr;
    }
}

Related

  1. getAlreadyBoundServerSocket(String address, int port, boolean ssl, boolean useChannels)
  2. getBestAddress(InetSocketAddress addr)
  3. getCanonicalConnectionAddress(InetSocketAddress address)
  4. getClientPort(SocketAddress socketAddress)
  5. getConnectAddress(InetSocketAddress addr)
  6. getDestination(InetSocketAddress server)
  7. getDestinationInetSocketAddress(URI uri, int defaultPort)
  8. getHostAddress(InetSocketAddress addr)
  9. getHostAddress(InetSocketAddress address)