BLOG | DOCUMENTATION | TRAC

Home --> Documentations --> PJLIB Reference

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

 


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