Home --> Documentations --> PJLIB Reference
Go to the documentation of this file.
19#ifndef __PJ_IOQUEUE_H__
20#define __PJ_IOQUEUE_H__
287#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
300#ifndef PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL
301# define PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL (16)
319#if !defined(PJ_IOQUEUE_MAX_CAND_EVENTS) || \
320 PJ_IOQUEUE_MAX_CAND_EVENTS < PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL
321# undef PJ_IOQUEUE_MAX_CAND_EVENTS
322# define PJ_IOQUEUE_MAX_CAND_EVENTS PJ_IOQUEUE_MAX_EVENTS_IN_SINGLE_POLL
330#define PJ_IOQUEUE_ALWAYS_ASYNC ((pj_uint32_t)1 << (pj_uint32_t)31)
683#if defined(PJ_HAS_TCP) && PJ_HAS_TCP != 0
long pj_ssize_t Definition: types.h:64
int pj_bool_t Definition: types.h:71
struct pj_ioqueue_t pj_ioqueue_t Definition: types.h:210
struct pj_lock_t pj_lock_t Definition: types.h:239
long pj_sock_t Definition: types.h:263
struct pj_ioqueue_key_t pj_ioqueue_key_t Definition: types.h:216
size_t pj_size_t Definition: types.h:58
void pj_sockaddr_t Definition: types.h:267
int pj_status_t Definition: types.h:68
struct pj_grp_lock_t pj_grp_lock_t Definition: types.h:242
unsigned int pj_uint32_t Definition: types.h:43
pj_ioqueue_epoll_flag Definition: ioqueue.h:337
void pj_ioqueue_op_key_init(pj_ioqueue_op_key_t *op_key, pj_size_t size)
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_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_create2(pj_pool_t *pool, pj_size_t max_fd, const pj_ioqueue_cfg *cfg, pj_ioqueue_t **ioqueue)
pj_status_t pj_ioqueue_set_user_data(pj_ioqueue_key_t *key, void *user_data, void **old_data)
pj_status_t pj_ioqueue_destroy(pj_ioqueue_t *ioque)
pj_status_t pj_ioqueue_set_default_concurrency(pj_ioqueue_t *ioqueue, pj_bool_t allow)
pj_ioqueue_operation_e Definition: ioqueue.h:279
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)
void * pj_ioqueue_get_user_data(pj_ioqueue_key_t *key)
pj_bool_t pj_ioqueue_is_pending(pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key)
pj_status_t pj_ioqueue_unregister(pj_ioqueue_key_t *key)
void pj_ioqueue_cfg_default(pj_ioqueue_cfg *cfg)
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_unlock_key(pj_ioqueue_key_t *key)
pj_status_t pj_ioqueue_create(pj_pool_t *pool, pj_size_t max_fd, pj_ioqueue_t **ioqueue)
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)
int pj_ioqueue_poll(pj_ioqueue_t *ioque, const pj_time_val *timeout)
pj_status_t pj_ioqueue_set_concurrency(pj_ioqueue_key_t *key, pj_bool_t allow)
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_lock_key(pj_ioqueue_key_t *key)
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)
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_clear_key(pj_ioqueue_key_t *key)
pj_status_t pj_ioqueue_trylock_key(pj_ioqueue_key_t *key)
const char * pj_ioqueue_name(void)
pj_status_t pj_ioqueue_connect(pj_ioqueue_key_t *key, const pj_sockaddr_t *addr, int addrlen)
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_IOQUEUE_EPOLL_AUTO Definition: ioqueue.h:351
@ PJ_IOQUEUE_EPOLL_ONESHOT Definition: ioqueue.h:344
@ PJ_IOQUEUE_EPOLL_EXCLUSIVE Definition: ioqueue.h:340
@ PJ_IOQUEUE_OP_SEND_TO Definition: ioqueue.h:286
@ PJ_IOQUEUE_OP_RECV Definition: ioqueue.h:282
@ PJ_IOQUEUE_OP_RECV_FROM Definition: ioqueue.h:283
@ PJ_IOQUEUE_OP_READ Definition: ioqueue.h:281
@ PJ_IOQUEUE_OP_WRITE Definition: ioqueue.h:284
@ PJ_IOQUEUE_OP_SEND Definition: ioqueue.h:285
@ PJ_IOQUEUE_OP_ACCEPT Definition: ioqueue.h:288
@ PJ_IOQUEUE_OP_CONNECT Definition: ioqueue.h:289
@ PJ_IOQUEUE_OP_NONE Definition: ioqueue.h:280
#define PJ_BEGIN_DECL Definition: config.h:1284
#define PJ_END_DECL Definition: config.h:1285
Definition: udp_echo_srv_ioqueue.c:27
Definition: ioqueue.h:219
void(* on_write_complete)(pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, pj_ssize_t bytes_sent) Definition: ioqueue.h:246
void(* on_read_complete)(pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, pj_ssize_t bytes_read) Definition: ioqueue.h:231
void(* on_accept_complete)(pj_ioqueue_key_t *key, pj_ioqueue_op_key_t *op_key, pj_sock_t sock, pj_status_t status) Definition: ioqueue.h:258
void(* on_connect_complete)(pj_ioqueue_key_t *key, pj_status_t status) Definition: ioqueue.h:269
Definition: ioqueue.h:362
unsigned epoll_flags Definition: ioqueue.h:370
pj_bool_t default_concurrency Definition: ioqueue.h:379
Definition: ioqueue.h:208
void * activesock_data Definition: ioqueue.h:210
void * user_data Definition: ioqueue.h:211
void * internal__[32] Definition: ioqueue.h:209
Declaration of basic types and utility.
PJLIB Open Source, high performance, small footprint, and very very portable framework
Copyright (C) 2006-2009 Teluu Inc.
|