cheroot.makefile module¶
Socket file object.
- class cheroot.makefile.BufferedWriter(raw, buffer_size=8192)¶
Bases:
BufferedWriter
Faux file object attached to a socket object.
- _abc_impl = <_abc._abc_data object>¶
- _flush_unlocked()¶
- write(b)¶
Write bytes to buffer.
- cheroot.makefile.MakeFile(sock, mode='r', bufsize=8192)¶
File object attached to a socket object.
- class cheroot.makefile.MakeFile_PY2(*args, **kwargs)¶
Bases:
object
Faux file object attached to a socket object.
- _drop()¶
- _fileobject_uses_str_type = False¶
- _reuse()¶
- flush()¶
Write all data from buffer to socket and reset write buffer.
- has_data()¶
Return true if there is buffered data to read.
- read(size=- 1)¶
Read data from the socket to buffer.
- readline(size=- 1)¶
Read line from the socket to buffer.
- recv(size)¶
Receive message of a size from the socket.
- send(data)¶
Send some part of message to the socket.
- write(data)¶
Send entire data contents for non-blocking sockets.
- class cheroot.makefile.StreamReader(sock, mode='r', bufsize=8192)¶
Bases:
BufferedReader
Socket stream reader.
- _abc_impl = <_abc._abc_data object>¶
- has_data()¶
Return true if there is buffered data to read.
- read(*args, **kwargs)¶
Capture bytes read.
- class cheroot.makefile.StreamWriter(sock, mode='w', bufsize=8192)¶
Bases:
BufferedWriter
Socket stream writer.
- _abc_impl = <_abc._abc_data object>¶
- write(val, *args, **kwargs)¶
Capture bytes written.