#include "includes.h"
#include <winsock2.h>
#include "common.h"
#include "eloop.h"
Include dependency graph for eloop_win.c:
Go to the source code of this file.
Data Structures | |
struct | eloop_sock |
struct | eloop_timeout |
struct | eloop_signal |
struct | eloop_data |
Functions | |
int | eloop_init (void *user_data) |
Initialize global event loop data. | |
int | eloop_register_read_sock (int sock, eloop_sock_handler handler, void *eloop_data, void *user_data) |
Register handler for read events. | |
void | eloop_unregister_read_sock (int sock) |
Unregister handler for read events. | |
int | eloop_register_event (void *event, size_t event_size, eloop_event_handler handler, void *eloop_data, void *user_data) |
Register handler for generic events. | |
void | eloop_unregister_event (void *event, size_t event_size) |
Unregister handler for a generic event. | |
int | eloop_register_timeout (unsigned int secs, unsigned int usecs, eloop_timeout_handler handler, void *eloop_data, void *user_data) |
Register timeout. | |
int | eloop_cancel_timeout (eloop_timeout_handler handler, void *eloop_data, void *user_data) |
Cancel timeouts. | |
int | eloop_register_signal (int sig, eloop_signal_handler handler, void *user_data) |
Register handler for signals. | |
int | eloop_register_signal_terminate (eloop_signal_handler handler, void *user_data) |
Register handler for terminate signals. | |
int | eloop_register_signal_reconfig (eloop_signal_handler handler, void *user_data) |
Register handler for reconfig signals. | |
void | eloop_run (void) |
Start the event loop. | |
void | eloop_terminate (void) |
Terminate event loop. | |
void | eloop_destroy (void) |
Free any resources allocated for the event loop. | |
int | eloop_terminated (void) |
Check whether event loop has been terminated. | |
void | eloop_wait_for_read_sock (int sock) |
Wait for a single reader. | |
void * | eloop_get_user_data (void) |
Get global user data. |
Alternatively, this software may be distributed under the terms of BSD license.
See README and COPYING for more details.
Definition in file eloop_win.c.
|
Cancel timeouts.
Definition at line 292 of file eloop_win.c. |
|
Free any resources allocated for the event loop. After calling eloop_destroy(), other eloop_* functions must not be called before re-running eloop_init(). Definition at line 553 of file eloop_win.c. |
|
Get global user data.
Definition at line 602 of file eloop_win.c. |
|
Initialize global event loop data.
Definition at line 83 of file eloop_win.c. |
|
Register handler for generic events.
In case of Windows implementation (eloop_win.c), event pointer is of HANDLE type, i.e., void*. The callers are likely to have 'HANDLE h' type variable, and they would call this function with eloop_register_event(h, sizeof(h), ...). Definition at line 191 of file eloop_win.c. |
|
Register handler for read events.
Definition at line 121 of file eloop_win.c. Here is the call graph for this function: |
|
Register handler for signals.
Signals are 'global' events and there is no local eloop_data pointer like with other handlers. The global user_data pointer registered with eloop_init() will be used as eloop_ctx for signal handlers. Definition at line 371 of file eloop_win.c. |
|
Register handler for reconfig signals.
Signals are 'global' events and there is no local eloop_data pointer like with other handlers. The global user_data pointer registered with eloop_init() will be used as eloop_ctx for signal handlers. This function is a more portable version of eloop_register_signal() since the knowledge of exact details of the signals is hidden in eloop implementation. In case of operating systems using signal(), this function registers a handler for SIGHUP. Definition at line 431 of file eloop_win.c. Here is the call graph for this function: |
|
Register handler for terminate signals.
Signals are 'global' events and there is no local eloop_data pointer like with other handlers. The global user_data pointer registered with eloop_init() will be used as eloop_ctx for signal handlers. This function is a more portable version of eloop_register_signal() since the knowledge of exact details of the signals is hidden in eloop implementation. In case of operating systems using signal(), this function registers handlers for SIGINT and SIGTERM. Definition at line 412 of file eloop_win.c. Here is the call graph for this function: |
|
Register timeout.
Definition at line 245 of file eloop_win.c. Here is the call graph for this function: |
|
Start the event loop. Start the event loop and continue running as long as there are any registered event handlers. This function is run after event loop has been initialized with event_init() and one or more events have been registered. Definition at line 439 of file eloop_win.c. Here is the call graph for this function: |
|
Terminate event loop. Terminate event loop even if there are registered events. This can be used to request the program to be terminated cleanly. Definition at line 546 of file eloop_win.c. |
|
Check whether event loop has been terminated.
Definition at line 574 of file eloop_win.c. |
|
Unregister handler for a generic event.
Definition at line 220 of file eloop_win.c. |
|
Unregister handler for read events.
Definition at line 164 of file eloop_win.c. Here is the call graph for this function: |
|
Wait for a single reader.
Definition at line 580 of file eloop_win.c. |