MCPcopy Index your code
hub / github.com/python/cpython / write

Method write

Lib/asyncio/sslproto.py:211–222  ·  view source on GitHub ↗

Write some data bytes to the transport. This does not block; it buffers the data and arranges for it to be sent out asynchronously.

(self, data)

Source from the content-addressed store, hash-verified

209 return self._ssl_protocol._app_writing_paused
210
211 def write(self, data):
212 """Write some data bytes to the transport.
213
214 This does not block; it buffers the data and arranges for it
215 to be sent out asynchronously.
216 """
217 if not isinstance(data, (bytes, bytearray, memoryview)):
218 raise TypeError(f"data: expecting a bytes-like instance, "
219 f"got {type(data).__name__}")
220 if not data:
221 return
222 self._ssl_protocol._write_appdata((data,))
223
224 def writelines(self, list_of_data):
225 """Write a list (or any iterable) of data bytes to the transport.

Callers 3

buffer_updatedMethod · 0.45
_do_writeMethod · 0.45
_process_outgoingMethod · 0.45

Calls 1

_write_appdataMethod · 0.80

Tested by

no test coverage detected