Loading...
Searching...
No Matches
async.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
23#ifndef NET_SOCK_ASYNC_H
24#define NET_SOCK_ASYNC_H
25
27
28#ifdef __cplusplus
29extern "C" {
30#endif
31
32#if defined(SOCK_HAS_ASYNC) || defined(DOXYGEN)
33#if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
34
51 sock_dtls_session_t *session);
52
67void sock_dtls_set_cb(sock_dtls_t *sock, sock_dtls_cb_t cb, void *cb_arg);
68#endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
69
70#if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
85void sock_ip_set_cb(sock_ip_t *sock, sock_ip_cb_t cb, void *cb_arg);
86#endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
87
88#if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
103void sock_tcp_set_cb(sock_tcp_t *sock, sock_tcp_cb_t cb, void *cb_arg);
104
120 void *cb_arg);
121#endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
122
123#if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
138void sock_udp_set_cb(sock_udp_t *sock, sock_udp_cb_t cb, void *cb_arg);
139#endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
140
141#if defined(SOCK_HAS_ASYNC_CTX) || defined(DOXYGEN)
142#include "sock_async_ctx.h" /* defines sock_async_ctx_t */
143
144#if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
160#endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
161
162#if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
178#endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
179
180#if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
196
212#endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
213
214#if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
230#endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
231#endif /* defined(SOCK_HAS_ASYNC_CTX) || defined(DOXYGEN) */
232#endif /* defined(SOCK_HAS_ASYNC) || defined(DOXYGEN) */
233
234#ifdef __cplusplus
235}
236#endif
237
238#endif /* NET_SOCK_ASYNC_H */
void sock_udp_set_cb(sock_udp_t *sock, sock_udp_cb_t cb, void *cb_arg)
Gets the asynchronous event context from sock object.
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
sock_async_ctx_t * sock_tcp_get_async_ctx(sock_tcp_t *sock)
Gets the asynchronous event context from sock object.
sock_async_ctx_t * sock_tcp_queue_get_async_ctx(sock_tcp_queue_t *queue)
Gets the asynchronous event context from TCP listening queue.
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_queue_set_cb(sock_tcp_queue_t *queue, sock_tcp_queue_cb_t cb, void *cb_arg)
Sets event callback for sock_tcp_queue_t.
void sock_dtls_set_cb(sock_dtls_t *sock, sock_dtls_cb_t cb, void *cb_arg)
Sets the asynchronous event context from sock object.
void sock_ip_set_cb(sock_ip_t *sock, sock_ip_cb_t cb, void *cb_arg)
Sets event callback for sock_ip_t.
void sock_tcp_set_cb(sock_tcp_t *sock, sock_tcp_cb_t cb, void *cb_arg)
Sets event callback for sock_tcp_t.
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
bool sock_dtls_get_event_session(sock_dtls_t *sock, sock_dtls_session_t *session)
Gets the asynchronous event session from sock object.
sock_async_ctx_t * sock_ip_get_async_ctx(sock_ip_t *sock)
Gets the asynchronous event context from sock object.
sock_async_ctx_t * sock_udp_get_async_ctx(sock_udp_t *sock)
Gets the asynchronous event context from sock object.
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
sock_async_ctx_t * sock_dtls_get_async_ctx(sock_dtls_t *sock)
Gets the asynchronous event context from sock object.
Type definitions for asynchronous socks with Event Queue.
Asynchronous context for Asynchronous sock with event API.
Information about remote client connected to the server.
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
Definitions for sock extension for asynchronous access.