def send_notification(self, method, *args): """Send a JSON-RPC notification.""" message = jsonrpc.create_notification(method, args) self.send_message(message)
def _forward_events(self, event, *args): # Forward an event as a notification over the message bus for _, protocol in self.connections: message = jsonrpc.create_notification(event, args) protocol.send_message(message)