Ejemplo n.º 1
0
        def send(msg):
            binaries, jsonMsg = recursiveBinarySearch(msg)

            WebSocketClientProtocol.sendMessage(self, json.dumps(jsonMsg))

            for data in binaries:
                msg = data[0] + data[1].getvalue()
                WebSocketClientProtocol.sendMessage(self, msg, binary=True)
Ejemplo n.º 2
0
    def _send(self, msg, binaries):
        """ Internally used method to send messages via WebSocket connection.
            Handles the actual sending of the message. (Not thread-safe; use
            sendMessage instead.)
        """
        WebSocketClientProtocol.sendMessage(self, msg)

        for data in binaries:
            binMsg = data[0] + data[1].getvalue()
            WebSocketClientProtocol.sendMessage(self, binMsg, binary=True)
Ejemplo n.º 3
0
    def _send(self, msg, binaries):
        """ Internally used method to send messages via WebSocket connection.
            Handles the actual sending of the message. (Not thread-safe; use
            sendMessage instead.)
        """
        WebSocketClientProtocol.sendMessage(self, msg)

        for data in binaries:
            binMsg = data[0] + data[1].getvalue()
            WebSocketClientProtocol.sendMessage(self, binMsg, binary=True)
Ejemplo n.º 4
0
 def sendMessage(self, payload):
     WebSocketClientProtocol.sendMessage(self, json.dumps(payload))
 def sendMessage(self, payload, binary=False):
     session_id = self.session_id if hasattr(self, "session_id") else None
     now = round(1000000 * (time.clock() - self.factory.case.started))
     rec = (now, session_id, "TX", payload)
     self.factory.case.wampLog.append(rec)
     WebSocketClientProtocol.sendMessage(self, payload, binary)
Ejemplo n.º 6
0
 def sendMessage(self, msg, binary, cb):
     assert self._cb is None
     self._cb = cb
     WebSocketClientProtocol.sendMessage(self, msg, binary)
Ejemplo n.º 7
0
 def sendMessage(self, msg, binary, cb):
     assert self._cb is None
     self._cb = cb
     WebSocketClientProtocol.sendMessage(self, msg, binary)