(self, data)
| 144 | self._writer.send(data, binary=False) |
| 145 | |
| 146 | def send_bytes(self, data): |
| 147 | if self._writer is None: |
| 148 | raise RuntimeError('Call .prepare() first') |
| 149 | if self._closed: |
| 150 | raise RuntimeError('websocket connection is closing') |
| 151 | if not isinstance(data, (bytes, bytearray, memoryview)): |
| 152 | raise TypeError('data argument must be byte-ish (%r)' % |
| 153 | type(data)) |
| 154 | self._writer.send(data, binary=True) |
| 155 | |
| 156 | @asyncio.coroutine |
| 157 | def wait_closed(self): # pragma: no cover |