Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals

io.h File Reference

Go to the source code of this file.

Typedefs

typedef io_s io_t

Enumerations

enum  io_fd_flags { IO_FD_NO_FLAGS, IO_FD_CLOSE }
enum  io_mem_flags { IO_MEM_NO_FLAGS, IO_MEM_FREE_BUF }

Functions

int io_fd_create (int fd, int flags, io_t **pio)
int io_mem_create (char *buf, size_t size, int flags, io_t **pio)
int io_close (io_t *io)
int io_free (io_t *io)
 Free an io_t object.
int io_dup (io_t *io, io_t **pio)
 Duplicate an IO handle.
int io_name_set (io_t *io, const char *name)
 Set the name of an io_t object.
int io_name_get (io_t *io, char *name, size_t sz)
 Return the name of the given io_t object.
ssize_t io_read (io_t *io, char *buf, size_t size)
 Read a block of data from an io_t object.
ssize_t io_write (io_t *io, const char *buf, size_t size)
 Write a block of data to an io_t object.
ssize_t io_flush (io_t *io)
 Flush the write buffer.
ssize_t io_seek (io_t *io, size_t off)
 Seek to the given position.
ssize_t io_tell (io_t *io)
 Return the current file position.
ssize_t io_copy (io_t *out, io_t *in, size_t size)
 Copy a block of data between two io_t objects.
ssize_t io_pipe (io_t *out, io_t *in)
 Write the input stream to the output stream.
ssize_t io_gets (io_t *io, char *buf, size_t size)
 Read a line from an io_t object.
ssize_t io_getc (io_t *io, char *c)
 Read a char from an io_t object.
ssize_t io_printf (io_t *io, const char *fmt,...)
 Write a string to io using printf-style format strings.
ssize_t io_putc (io_t *io, char c)
 Write a char to an io_t object.
int io_codec_add_head (io_t *io, codec_t *codec)
 Insert a codec at the head the codec chain.
int io_codec_add_tail (io_t *io, codec_t *codec)
 Append a codec to the codec chain.
int io_codecs_remove (io_t *io)
 Flush, remove and free all codecs in the codec chain.
int io_is_secure (io_t *io)


Typedef Documentation

typedef struct io_s io_t
 

Definition at line 28 of file io.h.

Referenced by app_init(), emb_open(), header_load(), io_codec_add_head(), io_codec_add_tail(), io_codecs_remove(), io_copy(), io_dup(), io_fd_create(), io_flush(), io_free(), io_getc(), io_gets(), io_is_secure(), io_mem_create(), io_name_get(), io_name_set(), io_pipe(), io_printf(), io_prv_create(), io_putc(), io_read(), io_seek(), io_ssl_create(), io_ssl_get_SSL(), io_tell(), io_write(), parser_set_io(), request_bind(), request_io(), response_bind(), response_io(), response_print_header_to_io(), session_prv_load_from_buf(), session_prv_load_from_io(), session_prv_save_to_buf(), session_prv_save_to_io(), translate(), translate_opaque_to_c(), translate_script_to_c(), u_file_open(), u_getline(), u_md5io(), u_printf_ccstr(), and u_tmpfile_open().


Enumeration Type Documentation

enum io_fd_flags
 

Enumeration values:
IO_FD_NO_FLAGS 
IO_FD_CLOSE 

Definition at line 30 of file io.h.

enum io_mem_flags
 

Enumeration values:
IO_MEM_NO_FLAGS 
IO_MEM_FREE_BUF 

Definition at line 35 of file io.h.


Function Documentation

int io_close io_t io  ) 
 

int io_fd_create int  fd,
int  flags,
io_t **  pio
 

Definition at line 114 of file iofd.c.

References io_create, io_fd_t, io_free(), io_t, io_s::read, io_s::seek, io_s::tell, io_s::term, and io_s::write.

Referenced by u_file_open().

int io_mem_create char *  buf,
size_t  size,
int  flags,
io_t **  pio
 

Definition at line 106 of file iomem.c.

References io_create, io_free(), io_mem_t, io_t, io_s::read, io_s::seek, io_s::size, io_s::tell, io_s::term, and io_s::write.

Referenced by emb_open(), session_prv_load_from_buf(), and session_prv_save_to_buf().


←Products
© 2005-2006 - KoanLogic S.r.l. - All rights reserved