MCPcopy
hub / github.com/aio-libs/aiohttp / send_bytes

Method send_bytes

aiohttp/web_ws.py:146–154  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

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

Callers 15

handlerMethod · 0.95
handlerFunction · 0.95
wshandlerFunction · 0.95
goMethod · 0.45
test_send_recv_bytesFunction · 0.45
test_ping_pongFunction · 0.45
test_ping_pong_manualFunction · 0.45
test_closeFunction · 0.45
test_close_from_serverFunction · 0.45

Calls 1

sendMethod · 0.45

Tested by 14

handlerMethod · 0.76
handlerFunction · 0.76
goMethod · 0.36
test_send_recv_bytesFunction · 0.36
test_ping_pongFunction · 0.36
test_ping_pong_manualFunction · 0.36
test_closeFunction · 0.36
test_close_from_serverFunction · 0.36
test_close_manualFunction · 0.36