Lely core libraries  2.3.4
io_handle_vtab Struct Reference

The virtual table of an I/O device handle. More...

#include <handle.h>

Collaboration diagram for io_handle_vtab:

Data Fields

int type
 The type of the device (one of IO_TYPE_CAN, IO_TYPE_FILE, IO_TYPE_PIPE, IO_TYPE_SERIAL or IO_TYPE_SOCK).
 
size_t size
 The size (in bytes) of the handle struct.
 
void(* fini )(struct io_handle *handle)
 A pointer to the fini method.
 
int(* flags )(struct io_handle *handle, int flags)
 A pointer to the static flags method.
 
ssize_t(* read )(struct io_handle *handle, void *buf, size_t nbytes)
 A pointer to the read method. More...
 
ssize_t(* write )(struct io_handle *handle, const void *buf, size_t nbytes)
 A pointer to the write method. More...
 
int(* flush )(struct io_handle *handle)
 A pointer to the flush method. More...
 
io_off_t(* seek )(struct io_handle *handle, io_off_t offset, int whence)
 A pointer to the seek method. More...
 
ssize_t(* pread )(struct io_handle *handle, void *buf, size_t nbytes, io_off_t offset)
 A pointer to the pread method. More...
 
ssize_t(* pwrite )(struct io_handle *handle, const void *buf, size_t nbytes, io_off_t offset)
 A pointer to the pwrite method. More...
 
int(* purge )(struct io_handle *handle, int flags)
 A pointer to the purge method. More...
 
ssize_t(* recv )(struct io_handle *handle, void *buf, size_t nbytes, io_addr_t *addr, int flags)
 A pointer to the recv method. More...
 
ssize_t(* send )(struct io_handle *handle, const void *buf, size_t nbytes, const io_addr_t *addr, int flags)
 A pointer to the send method. More...
 
struct io_handle *(* accept )(struct io_handle *handle, io_addr_t *addr)
 A pointer to the accept method. More...
 
int(* connect )(struct io_handle *handle, const io_addr_t *addr)
 A pointer to the connect method. More...
 

Detailed Description

The virtual table of an I/O device handle.

Definition at line 66 of file handle.h.

Field Documentation

◆ read

ssize_t(* io_handle_vtab::read) (struct io_handle *handle, void *buf, size_t nbytes)

A pointer to the read method.

See also
io_read()

Definition at line 79 of file handle.h.

◆ write

ssize_t(* io_handle_vtab::write) (struct io_handle *handle, const void *buf, size_t nbytes)

A pointer to the write method.

See also
io_write()

Definition at line 81 of file handle.h.

◆ flush

int(* io_handle_vtab::flush) (struct io_handle *handle)

A pointer to the flush method.

See also
io_flush()

Definition at line 84 of file handle.h.

◆ seek

io_off_t(* io_handle_vtab::seek) (struct io_handle *handle, io_off_t offset, int whence)

A pointer to the seek method.

See also
io_seek()

Definition at line 86 of file handle.h.

◆ pread

ssize_t(* io_handle_vtab::pread) (struct io_handle *handle, void *buf, size_t nbytes, io_off_t offset)

A pointer to the pread method.

See also
io_pread()

Definition at line 88 of file handle.h.

◆ pwrite

ssize_t(* io_handle_vtab::pwrite) (struct io_handle *handle, const void *buf, size_t nbytes, io_off_t offset)

A pointer to the pwrite method.

See also
io_pwrite()

Definition at line 91 of file handle.h.

◆ purge

int(* io_handle_vtab::purge) (struct io_handle *handle, int flags)

A pointer to the purge method.

See also
io_purge()

Definition at line 94 of file handle.h.

◆ recv

ssize_t(* io_handle_vtab::recv) (struct io_handle *handle, void *buf, size_t nbytes, io_addr_t *addr, int flags)

A pointer to the recv method.

See also
io_recv()

Definition at line 96 of file handle.h.

◆ send

ssize_t(* io_handle_vtab::send) (struct io_handle *handle, const void *buf, size_t nbytes, const io_addr_t *addr, int flags)

A pointer to the send method.

See also
io_send()

Definition at line 99 of file handle.h.

◆ accept

struct io_handle*(* io_handle_vtab::accept) (struct io_handle *handle, io_addr_t *addr)

A pointer to the accept method.

See also
io_accept()

Definition at line 99 of file handle.h.

◆ connect

int(* io_handle_vtab::connect) (struct io_handle *handle, const io_addr_t *addr)

A pointer to the connect method.

See also
io_connect()

Definition at line 104 of file handle.h.


The documentation for this struct was generated from the following file: