pelican/server/src/PelicanServer.cpp
/**
 * @details
 * Adds the given \p protocol to the given \p port.
 * The class takes ownership of \p protocol.
 *
 * @param proto A pointer to the allocated protocol.
 * @param port  The incoming port number to use.
 */
@details
Adds the given \p protocol to the given \p port.
The class takes ownership of \p protocol.

@param proto A pointer to the allocated protocol.
@param port  The incoming port number to use.
@details Adds the given \ p protocol to the given \ p port . The class takes ownership of \ p protocol . @param proto A pointer to the allocated protocol . @param port The incoming port number to use .
void PelicanServer::addProtocol(AbstractProtocol* protocol, quint16 port)
{
    if ( _protocolPortMap.contains(port) ) {
        delete protocol;
        throw QString("Cannot map multiple protocols to port %1").arg(port);
    }
    _protocolPortMap[port] = protocol;
}
void PelicanServer :: addProtocol ( AbstractProtocol * protocol , quint16 port ) { if ( _protocolPortMap . contains ( port ) ) { delete protocol ; throw QString ( " " ) . arg ( port ) ; } _protocolPortMap [ port ] = protocol ; }
@details
 Adds the given \p protocol to the given \p port.
@details Adds the given \ p protocol to the given \ p port .