IOFuncs#
- class IOFuncs(*args, **kwargs)#
A table of functions used to handle different types of IOChannel
in a generic way.
Fields#
- class IOFuncs
- io_close#
Closes the channel. This is called from
close()
after flushing the buffers.
- io_create_watch#
Creates a watch on the channel. This call corresponds directly to
io_create_watch()
.
- io_free#
Called from
unref()
when the channel needs to be freed. This function must free the memory associated with the channel, including freeing theIOChannel
structure itself. The channel buffers have been flushed and possiblyio_close
has been called by the time this function is called.
- io_get_flags#
Gets the
IOFlags
for the channel. This function need only return theAPPEND
andNONBLOCK
flags;get_flags()
automatically adds the others as appropriate.
- io_read#
Reads raw bytes from the channel. This is called from various functions such as
read_chars()
to read raw bytes from the channel. Encoding and buffering issues are dealt with at a higher level.
- io_set_flags#
Sets the
IOFlags
on the channel. This is called fromset_flags()
with all flags except forAPPEND
andNONBLOCK
masked out.
- io_write#
Writes raw bytes to the channel. This is called from various functions such as
write_chars()
to write raw bytes to the channel. Encoding and buffering issues are dealt with at a higher level.