TcpIpConnection newConnection(SocketChannelWrapper channel, Address endpoint) {
    TcpIpConnection connection =
        new TcpIpConnection(this, connectionIdGen.incrementAndGet(), channel, ioThreadingModel);

    connection.setEndPoint(endpoint);
    activeConnections.add(connection);
    acceptedSockets.remove(channel);

    connection.start();
    ioThreadingModel.onConnectionAdded(connection);

    logger.info(
        "Established socket connection between "
            + channel.socket().getLocalSocketAddress()
            + " and "
            + channel.socket().getRemoteSocketAddress());
    openedCount.inc();

    return connection;
  }