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 
26 #include "net/sock/async/types.h"
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 #if defined(SOCK_HAS_ASYNC) || defined(DOXYGEN)
33 #if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
34 
49 void sock_dtls_set_cb(sock_dtls_t *sock, sock_dtls_cb_t cb, void *cb_arg);
50 #endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
51 
52 #if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
53 
67 void sock_ip_set_cb(sock_ip_t *sock, sock_ip_cb_t cb, void *cb_arg);
68 #endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
69 
70 #if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
71 
85 void sock_tcp_set_cb(sock_tcp_t *sock, sock_tcp_cb_t cb, void *cb_arg);
86 
102  void *cb_arg);
103 #endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
104 
105 #if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
106 
120 void sock_udp_set_cb(sock_udp_t *sock, sock_udp_cb_t cb, void *cb_arg);
121 #endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
122 
123 #if defined(SOCK_HAS_ASYNC_CTX) || defined(DOXYGEN)
124 #include "sock_async_ctx.h" /* defines sock_async_ctx_t */
125 
126 #if defined(MODULE_SOCK_DTLS) || defined(DOXYGEN)
127 
142 #endif /* defined(MODULE_SOCK_DTLS) || defined(DOXYGEN) */
143 
144 #if defined(MODULE_SOCK_IP) || defined(DOXYGEN)
145 
160 #endif /* defined(MODULE_SOCK_IP) || defined(DOXYGEN) */
161 
162 #if defined(MODULE_SOCK_TCP) || defined(DOXYGEN)
163 
178 
194 #endif /* defined(MODULE_SOCK_TCP) || defined(DOXYGEN) */
195 
196 #if defined(MODULE_SOCK_UDP) || defined(DOXYGEN)
197 
212 #endif /* defined(MODULE_SOCK_UDP) || defined(DOXYGEN) */
213 #endif /* defined(SOCK_HAS_ASYNC_CTX) || defined(DOXYGEN) */
214 #endif /* defined(SOCK_HAS_ASYNC) || defined(DOXYGEN) */
215 
216 #ifdef __cplusplus
217 }
218 #endif
219 
220 #endif /* NET_SOCK_ASYNC_H */
221 
sock_tcp_set_cb
void sock_tcp_set_cb(sock_tcp_t *sock, sock_tcp_cb_t cb, void *cb_arg)
Sets event callback for sock_tcp_t.
sock_tcp_get_async_ctx
sock_async_ctx_t * sock_tcp_get_async_ctx(sock_tcp_t *sock)
Gets the asynchronous event context from sock object.
sock_ip_cb_t
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
sock_ip
Raw IP sock type.
Definition: sock_types.h:91
sock_tcp_queue_get_async_ctx
sock_async_ctx_t * sock_tcp_queue_get_async_ctx(sock_tcp_queue_t *queue)
Gets the asynchronous event context from TCP listening queue.
sock_async_ctx_t
Asynchronous context for Asynchronous sock with event API.
Definition: sock_async_ctx.h:64
types.h
Definitions for sock extension for asynchronous access.
sock_udp_set_cb
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.
sock_dtls
Information about DTLS sock.
Definition: sock_dtls_types.h:40
sock_ip_set_cb
void sock_ip_set_cb(sock_ip_t *sock, sock_ip_cb_t cb, void *cb_arg)
Sets event callback for sock_ip_t.
sock_udp
UDP sock type.
Definition: sock_types.h:128
sock_tcp_cb_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
sock_tcp_queue
TCP queue type.
Definition: sock_types.h:114
sock_dtls_get_async_ctx
sock_async_ctx_t * sock_dtls_get_async_ctx(sock_dtls_t *sock)
Gets the asynchronous event context from sock object.
sock_dtls_cb_t
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_ip_get_async_ctx
sock_async_ctx_t * sock_ip_get_async_ctx(sock_ip_t *sock)
Gets the asynchronous event context from sock object.
sock_udp_cb_t
void(* sock_udp_cb_t)(sock_udp_t *sock, sock_async_flags_t type, void *arg)
Event callback for sock_udp_t.
Definition: types.h:157
sock_udp_get_async_ctx
sock_async_ctx_t * sock_udp_get_async_ctx(sock_udp_t *sock)
Gets the asynchronous event context from sock object.
sock_async_ctx.h
Type definitions for asynchronous socks with Event Queue.
sock_tcp_queue_cb_t
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_tcp_queue_set_cb
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.
sock_tcp
TCP sock type.
Definition: sock_types.h:101
sock_dtls_set_cb
void sock_dtls_set_cb(sock_dtls_t *sock, sock_dtls_cb_t cb, void *cb_arg)
Gets the asynchronous event context from sock object.