| parrotcode: IO layer handling | |
| Contents | C |

io/io_passdown.c - IO layer handling

This is a set of helper functions which search for the first implementation of a function in the layer-stack, call it with the appropriate arguments and return the value returned.

ParrotIO *PIO_open_down(theINTERP, ParrotIOLayer *layer, const char *name, INTVAL flags)Open and calls it if found,
returning its return value.NULL if no implementation is found.ParrotIO *PIO_open_async_down(theINTERP, ParrotIOLayer *layer, const char *name, const char *mode, DummyCodeRef *dummy)Open_ASync and calls it if found,
returning its return value.NULL if no implementation is found.ParrotIO *PIO_fdopen_down(theINTERP, ParrotIOLayer *layer, PIOHANDLE fd, INTVAL flags)FDOpen and calls it if found,
returning its return value.NULL if no implementation is found.INTVAL PIO_close_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io)Close and calls it if found,
returning its return value.-1 if no implementation is found.size_t PIO_write_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *)Write and calls it if found,
returning its return value.0 if no implementation is found.size_t PIO_write_async_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *s, DummyCodeRef *dummy)WriteASync and calls it if found,
returning its return value.0 if no implementation is found.size_t PIO_read_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, void *buf, size_t len)Read and calls it if found,
returning its return value.0 if no implementation is found.size_t PIO_read_async_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING ** buf, DummyCodeRef *dummy)Read_ASync and calls it if found,
returning its return value.0 if no implementation is found.INTVAL PIO_flush_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io)Flush and calls it if found,
returning its return value.0 if no implementation is found.PIOOFF_T PIO_seek_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, PIOOFF_T offset, INTVAL whence)Seek and calls it if found,
returning its return value.-1 if no implementation is found.PIOOFF_T PIO_tell_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io)Tell and calls it if found,
returning its return value.0 if no implementation is found.INTVAL PIO_setbuf_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, size_t bufsize)SetBuf and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_setlinebuf_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io)SetLineBuf and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_eof_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io)Eof and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_poll_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, INTVAL which, INTVAL sec, INTVAL usec)Poll and calls it if found,
returning its return value.-1 if no implementation is found.ParrotIO *PIO_socket_down(theINTERP, ParrotIOLayer *layer, INTVAL fam, INTVAL type, INTVAL proto)Socket and calls it if found,
returning its return value.NULL if no implementation is found.INTVAL PIO_recv_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING **buf)Recv and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_send_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *buf)Send and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_connect_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *address)Connect and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_bind_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *address)Bind and calls it if found,
returning its return value.-1 if no implementation is found.INTVAL PIO_listen_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, INTVAL backlog)listen and calls it if found,
returning its return value.-1 if no implementation is found.ParrotIO *PIO_accept_down(theINTERP, ParrotIOLayer *layer, ParrotIO *io, STRING *address)YAccept and calls it if found,
returning its return value.-1 if no implementation is found.
io/io_buf.c, io/io_passdown.c, io/io_stdio.c, io/io_unix.c, io/io_win32.c, io/io.c, io/io_private.h.

Initially written by Juergen Boemmels
Some ideas and goals from Perl5.7 and Nick Ing-Simmons' work.

Hey! The above document had some coding errors, which are explained below:
|
|
|