PyDocs

Nav

Networking and Interprocess Communication

StreamWriter

asyncio

class (source) not WASI
  • StreamWriter(transport, protocol, reader, loop)
Wraps a Transport.

This exposes write(), writelines(), [can_]write_eof(),
get_extra_info() and close().  It adds drain() which returns an
optional Future on which you can wait for flow control.  It also
adds a transport property which references the Transport
directly.
Members of StreamWriter

c

can_write_eof
Return True if the underlying transport supports the write_eof() method, False otherwise.
close
The method closes the stream and the underlying socket.

d

drain
Flush the write buffer.

g

get_extra_info
Access optional transport information; see BaseTransport.get_extra_info() for details.

i

is_closing
Return True if the stream is closed or in the process of being closed.

s

start_tls
Upgrade an existing stream-based connection to TLS.

t

transport
Return the underlying asyncio transport.

w

wait_closed
Wait until the stream is closed.
write
The method attempts to write the data to the underlying socket immediately.
write_eof
Close the write end of the stream after the buffered write data is flushed.
writelines
The method writes a list (or any iterable) of bytes to the underlying socket immediately.
0 Examples
No examples for asyncio/StreamWriter.
See Also
No see-alsos for asyncio/StreamWriter
0 Notes
No notes for StreamWriter