def attach_tcp_service(cls, tcp_service: TCPService):
        """ Attaches a service for hosting
        :param tcp_service: A TCPService instance
        """
        if cls._tcp_service is None:
            cls._tcp_service = tcp_service
            cls._set_bus(tcp_service)
        else:
            warnings.warn('TCP service is already attached')
def attach_tcp_service ( cls , tcp_service : TCPService ) : if cls . _tcp_service is None : cls . _tcp_service = tcp_service cls . _set_bus ( tcp_service ) else : warnings . warn ( 'TCP service is already attached' )
Attaches a service for hosting
        :param tcp_service: A TCPService instance