def writeSequence(self, data): for d in data: d = normalize(d, self.factory.options['encoding']) RawWebSocket.write(self, "a" + json.dumps(data))
def write(self, data): data = normalize(data, self.factory.options['encoding']) RawWebSocket.write(self, "a" + json.dumps([data]))
def relayData(self, data): data = normalize(data, self.factory.options['encoding']) self.wrappedProtocol.dataReceived(data)
def writeSequence(self, data): for d in data: d = normalize(d, self.factory.options['encoding']) RawWebSocket.write(self, "a"+json.dumps(data))
def write(self, data): data = normalize(data, self.factory.options['encoding']) RawWebSocket.write(self, "a"+json.dumps([data]))