Deleted Added
full compact
winsock_event.h (256281) winsock_event.h (269257)
1/*
2 * util/winsock_event.h - unbound event handling for winsock on windows
3 *
4 * Copyright (c) 2008, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 7 unchanged lines hidden (view full) ---

16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * Neither the name of the NLNET LABS nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1/*
2 * util/winsock_event.h - unbound event handling for winsock on windows
3 *
4 * Copyright (c) 2008, NLnet Labs. All rights reserved.
5 *
6 * This software is open source.
7 *
8 * Redistribution and use in source and binary forms, with or without

--- 7 unchanged lines hidden (view full) ---

16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 *
19 * Neither the name of the NLNET LABS nor the names of its contributors may
20 * be used to endorse or promote products derived from this software without
21 * specific prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
25 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
26 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
27 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
28 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
29 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
30 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
31 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
32 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
24 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
25 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
26 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
27 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
28 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
29 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
30 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
31 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
32 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
33 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 */
35
36/**
37 * \file
38 *
39 * This file contains interface functions with the WinSock2 API on Windows.
40 * It uses the winsock WSAWaitForMultipleEvents interface on a number of
41 * sockets.

--- 82 unchanged lines hidden (view full) ---

124 int max;
125 /** capacity of array, size of array in items */
126 int cap;
127 /** array of 0 - maxsig of ptr to event for it */
128 struct event** signals;
129 /** if we need to exit */
130 int need_to_exit;
131 /** where to store time in seconds */
34 */
35
36/**
37 * \file
38 *
39 * This file contains interface functions with the WinSock2 API on Windows.
40 * It uses the winsock WSAWaitForMultipleEvents interface on a number of
41 * sockets.

--- 82 unchanged lines hidden (view full) ---

124 int max;
125 /** capacity of array, size of array in items */
126 int cap;
127 /** array of 0 - maxsig of ptr to event for it */
128 struct event** signals;
129 /** if we need to exit */
130 int need_to_exit;
131 /** where to store time in seconds */
132 uint32_t* time_secs;
132 time_t* time_secs;
133 /** where to store time in microseconds */
134 struct timeval* time_tv;
135 /**
136 * TCP streams have sticky events to them, these are not
137 * reported by the windows event system anymore, we have to
138 * keep reporting those events as present until wouldblock() is
139 * signalled by the handler back to use.
140 */

--- 48 unchanged lines hidden (view full) ---

189 * User created and user closed WSAEvent. Only signaled/unsigneled,
190 * no read/write/distinctions needed. */
191 int is_signal;
192 /** used during callbacks to see which events were just checked */
193 int just_checked;
194};
195
196/** create event base */
133 /** where to store time in microseconds */
134 struct timeval* time_tv;
135 /**
136 * TCP streams have sticky events to them, these are not
137 * reported by the windows event system anymore, we have to
138 * keep reporting those events as present until wouldblock() is
139 * signalled by the handler back to use.
140 */

--- 48 unchanged lines hidden (view full) ---

189 * User created and user closed WSAEvent. Only signaled/unsigneled,
190 * no read/write/distinctions needed. */
191 int is_signal;
192 /** used during callbacks to see which events were just checked */
193 int just_checked;
194};
195
196/** create event base */
197void *event_init(uint32_t* time_secs, struct timeval* time_tv);
197void *event_init(time_t* time_secs, struct timeval* time_tv);
198/** get version */
199const char *event_get_version(void);
200/** get polling method (select,epoll) */
201const char *event_get_method(void);
202/** run select in a loop */
203int event_base_dispatch(struct event_base *);
204/** exit that loop */
205int event_base_loopexit(struct event_base *, struct timeval *);

--- 59 unchanged lines hidden ---
198/** get version */
199const char *event_get_version(void);
200/** get polling method (select,epoll) */
201const char *event_get_method(void);
202/** run select in a loop */
203int event_base_dispatch(struct event_base *);
204/** exit that loop */
205int event_base_loopexit(struct event_base *, struct timeval *);

--- 59 unchanged lines hidden ---