| 1 | /* librist. Copyright © 2019 SipRadius LLC. All right reserved. |
| 2 | * Author: Daniele Lacamera <[email protected]> |
| 3 | * Author: Sergio Ammirata, Ph.D. <[email protected]> |
| 4 | * |
| 5 | * SPDX-License-Identifier: BSD-2-Clause |
| 6 | */ |
| 7 | |
| 8 | #ifndef __LIBEVSOCKET |
| 9 | #define __LIBEVSOCKET |
| 10 | |
| 11 | #include "common/attributes.h" |
| 12 | |
| 13 | #ifdef _WIN32 |
| 14 | #include <winsock2.h> |
| 15 | #else |
| 16 | #include <poll.h> |
| 17 | #endif |
| 18 | |
| 19 | struct evsocket_event; |
| 20 | struct evsocket_ctx; |
| 21 | |
| 22 | typedef int (*evsocket_poll_func)(void *opaque, struct pollfd *fds, |
| 23 | int nfds, int timeout_ms); |
| 24 | |
| 25 | RIST_PRIV void evsocket_set_poll_override(struct evsocket_ctx *ctx, |
| 26 | evsocket_poll_func func, |
| 27 | void *opaque); |
| 28 | |
| 29 | #endif |
| 30 |