(self, hostname, port)
| 3993 | # Adapter to turn websocket into a stream "connection" |
| 3994 | class BinWebSocket(object): |
| 3995 | def __init__(self, hostname, port): |
| 3996 | self.ws = websocket.WebSocket() |
| 3997 | self.ws.connect("ws://" + hostname + ":" + str(port)) |
| 3998 | self.recvbuf = bytes() |
| 3999 | |
| 4000 | def send(self, data): |
| 4001 | self.ws.send(data, websocket.ABNF.OPCODE_BINARY) |