Public Member Functions | |
def | __init__ |
def | close_fd |
def | fileno |
def | read_from_fd |
def | write_to_fd |
Public Attributes | |
fd |
Pipe-based `IOStream` implementation. The constructor takes an integer file descriptor (such as one returned by `os.pipe`) rather than an open file object. Pipes are generally one-way, so a `PipeIOStream` can be used for reading or writing but not both.
Definition at line 1308 of file iostream.py.
def tornado.iostream.PipeIOStream.__init__ | ( | self, | |
fd, | |||
args, | |||
kwargs | |||
) |
Definition at line 1316 of file iostream.py.
def tornado.iostream.PipeIOStream.close_fd | ( | self | ) |
Closes the file underlying this stream. ``close_fd`` is called by `BaseIOStream` and should not be called elsewhere; other users should call `close` instead.
Reimplemented from tornado.iostream.BaseIOStream.
Definition at line 1324 of file iostream.py.
def tornado.iostream.PipeIOStream.fileno | ( | self | ) |
Returns the file descriptor for this stream.
Reimplemented from tornado.iostream.BaseIOStream.
Definition at line 1321 of file iostream.py.
def tornado.iostream.PipeIOStream.read_from_fd | ( | self | ) |
Attempts to read from the underlying file. Returns ``None`` if there was nothing to read (the socket returned `~errno.EWOULDBLOCK` or equivalent), otherwise returns the data. When possible, should return no more than ``self.read_chunk_size`` bytes at a time.
Reimplemented from tornado.iostream.BaseIOStream.
Definition at line 1330 of file iostream.py.
def tornado.iostream.PipeIOStream.write_to_fd | ( | self, | |
data | |||
) |
Attempts to write ``data`` to the underlying file. Returns the number of bytes written.
Reimplemented from tornado.iostream.BaseIOStream.
Definition at line 1327 of file iostream.py.
Definition at line 1316 of file iostream.py.