BLOG | DOCUMENTATION | GITHUB

Home --> Documentations --> PJLIB Reference

sock_select.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2008-2011 Teluu Inc. (http://www.teluu.com)
3 * Copyright (C) 2003-2008 Benny Prijono <benny@prijono.org>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 */
19#ifndef __PJ_SELECT_H__
20#define __PJ_SELECT_H__
21
27#include <pj/types.h>
28
30
55typedef struct pj_fd_set_t
56{
59
60
66PJ_DECL(void) PJ_FD_ZERO(pj_fd_set_t *fdsetp);
67
68
81PJ_DECL(pj_size_t) PJ_FD_COUNT(const pj_fd_set_t *fdsetp);
82
83
92PJ_DECL(void) PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp);
93
102PJ_DECL(void) PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp);
103
104
114PJ_DECL(pj_bool_t) PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp);
115
116
137PJ_DECL(int) pj_sock_select( int n,
138 pj_fd_set_t *readfds,
139 pj_fd_set_t *writefds,
140 pj_fd_set_t *exceptfds,
141 const pj_time_val *timeout);
142
143
150
151#endif /* __PJ_SELECT_H__ */
int pj_bool_t
Definition: types.h:71
long pj_sock_t
Definition: types.h:263
size_t pj_size_t
Definition: types.h:58
pj_size_t PJ_FD_COUNT(const pj_fd_set_t *fdsetp)
void PJ_FD_SET(pj_sock_t fd, pj_fd_set_t *fdsetp)
void PJ_FD_CLR(pj_sock_t fd, pj_fd_set_t *fdsetp)
void PJ_FD_ZERO(pj_fd_set_t *fdsetp)
pj_bool_t PJ_FD_ISSET(pj_sock_t fd, const pj_fd_set_t *fdsetp)
int pj_sock_select(int n, pj_fd_set_t *readfds, pj_fd_set_t *writefds, pj_fd_set_t *exceptfds, const pj_time_val *timeout)
#define PJ_IOQUEUE_MAX_HANDLES
Definition: config.h:681
#define PJ_BEGIN_DECL
Definition: config.h:1284
#define PJ_END_DECL
Definition: config.h:1285
Definition: sock_select.h:56
pj_sock_t data[PJ_IOQUEUE_MAX_HANDLES+4]
Definition: sock_select.h:57
Definition: types.h:397
Declaration of basic types and utility.

 


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