Part of twisted.internet View Source
|Function||setNonBlocking||Make a file descriptor non-blocking.|
|Function||setBlocking||Make a file descriptor blocking.|
|Function||readFromFD||Read from file descriptor, calling callback with resulting data.|
|Function||writeToFD||Write data to file descriptor.|
Read from file descriptor, calling callback with resulting data.Returns same thing FileDescriptor.doRead would.
|Parameters||fd||non-blocking file descriptor to be read from.
a callable which accepts a single argument. If data is read from the file descriptor it will be called with this data. Handling exceptions from calling the callback is up to the caller.Note that if the descriptor is still connected but no data is read, None will be returned but callback will not be called.
|Returns||CONNECTION_LOST on error, CONNECTION_DONE when fd is closed, otherwise None.|
Write data to file descriptor.Returns same thing FileDescriptor.writeSomeData would.
|Parameters||fd||non-blocking file descriptor to be written to.
|data||bytes to write to fd.
|Returns||number of bytes written, or CONNECTION_LOST.|