def registerWebsocketProtocol(self, connection, protocol):
        """ Register the client protocol with a Connection object.

            @param connection:  Connection where the protocol should be
                                registered.
            @type  connection:  rce.robot.Connection

            @param protocol:    Protocol which should be registered.
            @type  protocol:    rce.comm.interfaces.IServersideProtocol
        """
        assert connection in self._deathCandidates
        connection.registerProtocol(protocol)
        self._deathCandidates.pop(connection).cancel()
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/robot.py/RobotClient.registerWebsocketProtocol/original