Example #1
0
 def close(self, code=3000, reason="Go away!"):
     RawWebSocket.write(self, 'c[%d,"%s"]' % (code, reason))
     RawWebSocket.close(self)
Example #2
0
 def writeSequence(self, data):
     for d in data:
         d = normalize(d, self.factory.options['encoding'])
     RawWebSocket.write(self, "a" + json.dumps(data))
Example #3
0
 def prepConnection(self):
     RawWebSocket.write(self, "o")
Example #4
0
 def write(self, data):
     data = normalize(data, self.factory.options['encoding'])
     RawWebSocket.write(self, "a" + json.dumps([data]))
Example #5
0
 def close(self, code = 3000, reason = "Go away!"):
     RawWebSocket.write(self,'c[%d,"%s"]' % (code, reason))
     RawWebSocket.close(self)
Example #6
0
 def prepConnection(self):
     RawWebSocket.write(self,"o")
Example #7
0
 def writeSequence(self, data):
     for d in data:
         d = normalize(d, self.factory.options['encoding'])
     RawWebSocket.write(self, "a"+json.dumps(data))
Example #8
0
 def write(self, data):
     data = normalize(data, self.factory.options['encoding'])
     RawWebSocket.write(self, "a"+json.dumps([data]))