Loading...
Searching...
No Matches
sock_async_ctx.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
18#ifndef SOCK_ASYNC_CTX_H
19#define SOCK_ASYNC_CTX_H
20
21#include "event.h"
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
30typedef union {
34 void (*generic)(void *, sock_async_flags_t, void *);
35#ifdef MODULE_SOCK_DTLS
36 sock_dtls_cb_t dtls;
37#endif
38#ifdef MODULE_SOCK_IP
39 sock_ip_cb_t ip;
40#endif
41#ifdef MODULE_SOCK_TCP
42 sock_tcp_cb_t tcp;
43 sock_tcp_queue_cb_t tcp_queue;
44#endif
45#ifdef MODULE_SOCK_UDP
46 sock_udp_cb_t udp;
47#endif
49
60
68
69#ifdef __cplusplus
70}
71#endif
72
73#endif /* SOCK_ASYNC_CTX_H */
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
sock_async_flags_t
Flag types to signify asynchronous sock events.
Definition types.h:37
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
event queue structure
Definition event.h:156
event structure
Definition event.h:148
Asynchronous context for Asynchronous sock with event API.
event_queue_t * queue
event queue to post socket events to
sock_event_t event
event storage
Event definition for context scope.
event_t super
event structure that gets extended
void * sock
generic pointer to a Sock API object
sock_event_cb_t cb
callback
void * cb_arg
callback argument
sock_async_flags_t type
types of the event
Generalized callback type.