Loading...
Searching...
No Matches
event.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2019 Freie Universität Berlin
3 *
4 * This file is subject to the terms and conditions of the GNU Lesser
5 * General Public License v2.1. See the file LICENSE in the top level
6 * directory for more details.
7 */
8
161#ifndef NET_SOCK_ASYNC_EVENT_H
162#define NET_SOCK_ASYNC_EVENT_H
163
164#include "event.h"
165/* guard required since `sock_dtls_types.h` might not be provided */
166#ifdef MODULE_SOCK_DTLS
167#include "net/sock/dtls.h"
168#endif /* MODULE_SOCK_DTLS */
169#include "net/sock/ip.h"
170#include "net/sock/tcp.h"
171#include "net/sock/udp.h"
172#include "net/sock/async.h"
173
174#ifdef __cplusplus
175extern "C" {
176#endif
177
178/* guard required since `sock_dtls_types.h` might not be provided */
179#if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
193 sock_dtls_cb_t handler, void *handler_arg);
194#endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
195
196#if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
210 sock_ip_cb_t handler, void *handler_arg);
211#endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
212
213#if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
227 sock_tcp_cb_t handler, void *handler_arg);
228
242 sock_tcp_queue_cb_t handler, void *handler_arg);
243#endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
244
245#if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
259 sock_udp_cb_t handler, void *handler_arg);
260#endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
261
262#ifdef __cplusplus
263}
264#endif
265
266#endif /* NET_SOCK_ASYNC_EVENT_H */
Definitions for sock extension for asynchronous access.
void sock_tcp_event_init(sock_tcp_t *sock, event_queue_t *ev_queue, sock_tcp_cb_t handler, void *handler_arg)
Makes a TCP sock able to handle asynchronous events using Event Queue.
void sock_dtls_event_init(sock_dtls_t *sock, event_queue_t *ev_queue, sock_dtls_cb_t handler, void *handler_arg)
Makes a DTLS sock able to handle asynchronous events using Event Queue.
void sock_ip_event_init(sock_ip_t *sock, event_queue_t *ev_queue, sock_ip_cb_t handler, void *handler_arg)
Makes a raw IPv4/IPv6 sock able to handle asynchronous events using Event Queue.
void sock_tcp_queue_event_init(sock_tcp_queue_t *queue, event_queue_t *ev_queue, sock_tcp_queue_cb_t handler, void *handler_arg)
Makes a TCP listening queue able to handle asynchronous events using Event Queue.
void sock_udp_event_init(sock_udp_t *sock, event_queue_t *ev_queue, sock_udp_cb_t handler, void *handler_arg)
Makes a UDP sock able to handle asynchronous events using Event Queue.
void(* sock_tcp_queue_cb_t)(sock_tcp_queue_t *queue, sock_async_flags_t flags, void *arg)
Event callback for sock_tcp_queue_t.
Definition types.h:133
void(* sock_udp_cb_t)(sock_udp_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_udp_t.
Definition types.h:157
void(* sock_tcp_cb_t)(sock_tcp_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_tcp_t.
Definition types.h:117
void(* sock_ip_cb_t)(sock_ip_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_ip_t.
Definition types.h:91
void(* sock_dtls_cb_t)(sock_dtls_t *sock, sock_async_flags_t flags, void *arg)
Event callback for sock_dtls_t.
Definition types.h:68
Raw IPv4/IPv6 sock definitions.
Asynchronous sock using Event Queue definitions.
DTLS sock definitions.
TCP sock definitions.
UDP sock definitions.
event queue structure
Definition event.h:156
Information about DTLS sock.
Raw IP sock type.
Definition sock_types.h:91
TCP queue type.
Definition sock_types.h:114
TCP sock type.
Definition sock_types.h:101
UDP sock type.
Definition sock_types.h:128