private String generateConnectionId(SocketChannel channel) {
    Socket socket = channel.socket();
    String localHost = socket.getLocalAddress().getHostAddress();
    int localPort = socket.getLocalPort();
    String remoteHost = socket.getInetAddress().getHostAddress();
    int remotePort = socket.getPort();
    long connectionIdSuffix = idGenerator.getAndIncrement();
    return localHost + ":" + localPort + "-" + remoteHost + ":" + remotePort + "_" + connectionIdSuffix;
  }
Generate an unique connection id
@param channel The channel between two hosts
@return The id for the connection that was created
ambry-network/src/main/java/com/github/ambry/network/Selector.java