=over
-=item io_new_bufchain()
-
-returns a new io_glue object that has the 'empty' source and but can
-be written to and read from later (like a pseudo file).
-
-
-=for comment
-From: File iolayer.c
-
-=item io_new_buffer(data, length)
-
-Returns a new io_glue object that has the source defined as reading
-from specified buffer. Note that the buffer is not copied.
-
- data - buffer to read from
- length - length of buffer
-
-
-=for comment
-From: File iolayer.c
-
-=item io_new_cb(p, read_cb, write_cb, seek_cb, close_cb, destroy_cb)
-
-Create a new I/O layer object that calls your supplied callbacks.
-
-In general the callbacks should behave like the corresponding POSIX
-primitives.
-
-=over
-
-=item *
-
-C<read_cb>(p, buffer, length) should read up to C<length> bytes into
-C<buffer> and return the number of bytes read. At end of file, return
-0. On error, return -1.
-
-=item *
-
-C<write_cb>(p, buffer, length) should write up to C<length> bytes from
-C<buffer> and return the number of bytes written. A return value <= 0
-will be treated as an error.
-
-=item *
-
-C<seekcb>(p, offset, whence) should seek and return the new offset.
-
-=item *
-
-C<close_cb>(p) should return 0 on success, -1 on failure.
-
-=item *
-
-C<destroy_cb>(p) should release any memory specific to your callback
-handlers.
-
-=back
-
-
-=for comment
-From: File iolayer.c
-
-=item io_new_fd(fd)
-
-returns a new io_glue object that has the source defined as reading
-from specified file descriptor. Note that the the interface to receiving
-data from the io_glue callbacks hasn't been done yet.
-
- fd - file descriptor to read/write from
-
-
-=for comment
-From: File iolayer.c
-
=item i_io_close(io)
Flush any pending output and perform the close action for the stream.