BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

ioqueue.h File Reference

I/O Dispatching Mechanism. More...

Go to the source code of this file.

Data Structures

struct  pj_ioqueue_op_key_t
 
struct  pj_ioqueue_callback
 

Macros

#define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL   (16)
 
#define PJ_IOQUEUE_ALWAYS_ASYNC   ((pj_uint32_t)1 << (pj_uint32_t)31)
 

Enumerations

enum  pj_ioqueue_operation_e {
  PJ_IOQUEUE_OP_NONE = 0, PJ_IOQUEUE_OP_READ = 1, PJ_IOQUEUE_OP_RECV = 2, PJ_IOQUEUE_OP_RECV_FROM = 4,
  PJ_IOQUEUE_OP_WRITE = 8, PJ_IOQUEUE_OP_SEND = 16, PJ_IOQUEUE_OP_SEND_TO = 32, PJ_IOQUEUE_OP_ACCEPT = 64,
  PJ_IOQUEUE_OP_CONNECT = 128
}
 

Functions

const char * pj_ioqueue_name (void)
 
pj_status_t pj_ioqueue_create (pj_pool_t *pool, pj_size_t max_fd, pj_ioqueue_t **ioqueue)
 
pj_status_t pj_ioqueue_destroy (pj_ioqueue_t *ioque)
 
pj_status_t pj_ioqueue_set_lock (pj_ioqueue_t *ioque, pj_lock_t *lock, pj_bool_t auto_delete)
 
pj_status_t pj_ioqueue_set_default_concurrency (pj_ioqueue_t *ioqueue, pj_bool_t allow)
 
pj_status_t pj_ioqueue_register_sock (pj_pool_t *pool, pj_ioqueue_t *ioque, pj_sock_t sock, void *user_data, const pj_ioqueue_callback *cb, pj_ioqueue_key_t **key)
 
pj_status_t pj_ioqueue_register_sock2 (pj_pool_t *pool, pj_ioqueue_t *ioque, pj_sock_t sock, pj_grp_lock_t *grp_lock, void *user_data, const pj_ioqueue_callback *cb, pj_ioqueue_key_t **key)
 
pj_status_t pj_ioqueue_unregister (pj_ioqueue_key_t *key)
 
void * pj_ioqueue_get_user_data (pj_ioqueue_key_t *key)
 
pj_status_t pj_ioqueue_set_user_data (pj_ioqueue_key_t *key, void *user_data, void **old_data)
 
pj_status_t pj_ioqueue_set_concurrency (pj_ioqueue_key_t *key, pj_bool_t allow)
 
pj_status_t pj_ioqueue_lock_key (pj_ioqueue_key_t *key)
 
pj_status_t pj_ioqueue_unlock_key (pj_ioqueue_key_t *key)
 
void pj_ioqueue_op_key_init (pj_ioqueue_op_key_t *op_key, pj_size_t size)
 
pj_bool_t pj_ioqueue_is_pending (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key)
 
pj_status_t pj_ioqueue_post_completion (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, pj_ssize_t bytes_status)
 
pj_status_t pj_ioqueue_accept (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, pj_sock_t *new_sock, pj_sockaddr_t *local, pj_sockaddr_t *remote, int *addrlen)
 
pj_status_t pj_ioqueue_connect (pj_ioqueue_key_t *key, const pj_sockaddr_t *addr, int addrlen)
 
int pj_ioqueue_poll (pj_ioqueue_t *ioque, const pj_time_val *timeout)
 
pj_status_t pj_ioqueue_recv (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, void *buffer, pj_ssize_t *length, pj_uint32_t flags)
 
pj_status_t pj_ioqueue_recvfrom (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, void *buffer, pj_ssize_t *length, pj_uint32_t flags, pj_sockaddr_t *addr, int *addrlen)
 
pj_status_t pj_ioqueue_send (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, const void *data, pj_ssize_t *length, pj_uint32_t flags)
 
pj_status_t pj_ioqueue_sendto (pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, const void *data, pj_ssize_t *length, pj_uint32_t flags, const pj_sockaddr_t *addr, int addrlen)
 

Detailed Description

I/O Dispatching Mechanism.

 


PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.