def processInit(self, protocol, connID, remoteKey):
        """ Callback for the RCE Internal Protocol which is called when the
            protocol received an init message which has to be processed.

            @param protocol:    Protocol instance which received the init
                                message.
            @type  protocol:    rce.slave.protocol.RCEInternalProtocol

            @param connID:      Unique ID which is used to identify the
                                connection.
            @type  connID:      str

            @param remoteKey:   Key which was received from the other side to
                                authenticate the endpoint.
            @type  remoteKey:   str

            @return:            True if the connection should be accepted.
            @rtype:             twisted.internet.defer.Deferred
        """
        try:
            key, auth = self._pendingConnections[connID]
        except __HOLE__:
            return fail(Failure(ConnectionError('Connection was not '
                                                'expected.')))

        try:
            if key:
                protocol.sendInit(connID, key)
        except Exception as e:
            failure = Failure(e)
            # TODO: Signal back the error
            # v does not work
            #auth.callRemote('verifyKey', None, failure)
            return fail(failure)
        else:
            return auth.callRemote('verifyKey', remoteKey, protocol)

        # Should never be reached...
        raise RuntimeError
dataset/ETHPy150Open rapyuta/rce/rce-core/rce/slave/endpoint.py/Endpoint.processInit