server/src/main/java/com/orientechnologies/orient/server/OClientConnectionManager.java
public OClientConnection getConnection(final int iChannelId, ONetworkProtocol protocol) {
    // SEARCH THE CONNECTION BY ID
    OClientConnection connection = connections.get(iChannelId);
    if (connection != null)
      connection.setProtocol(protocol);

    return connection;
  }
public OClientConnection getConnection(final int iChannelId, ONetworkProtocol protocol) {
    // SEARCH THE CONNECTION BY ID
    OClientConnection connection = connections.get(iChannelId);
    if (connection != null)
      connection.setProtocol(protocol);

    return connection;
  }
public OClientConnection getConnection ( final int iChannelId , ONetworkProtocol protocol ) { // SEARCH THE CONNECTION BY ID OClientConnection connection = connections . get ( iChannelId ) ; if ( connection != null ) connection . setProtocol ( protocol ) ; return connection ; }
Retrieves the connection by id.

@param iChannelId id of connection

@return The connection if any, otherwise null
Retrieves the connection by id .