Example #1
0
    def handle_setName(self, name):
        self.log.debug('Setting name to {name}', name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {'action': 'setNameFailed'}
        else:
            response = {'action': 'setNameSuccess'}
        self.sendMessage(dumps(response))
Example #2
0
    def handle_setName(self, name):
        self.log.debug('Setting name to {name}', name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {'action': 'setNameFailed'}
        else:
            response = {'action': 'setNameSuccess'}
        self.sendMessage(dumps(response))
Example #3
0
    def handle_setName(self, name):
        self.log.debug("Setting name to {name}", name=name)

        try:
            yield self._talker.setName(name)
        except ValueError:
            response = {"action": "setNameFailed"}
        else:
            response = {"action": "setNameSuccess"}
        self.sendMessage(dumps(response))
Example #4
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({
         'action': action,
         'payload': payload
     }))
Example #5
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({'action': action, 'payload': payload}))
Example #6
0
 def sendAction(self, payload=None, action=None):
     self.sendMessage(dumps({"action": action, "payload": payload}))