Loading...
Searching...
No Matches
sock_async_ctx.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2019 Freie Universität Berlin
3 * SPDX-License-Identifier: LGPL-2.1-only
4 */
5
6#pragma once
7
17
18#include "event.h"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
27typedef union {
31 void (*generic)(void *, sock_async_flags_t, void *);
32#ifdef MODULE_SOCK_DTLS
33 sock_dtls_cb_t dtls;
34#endif
35#ifdef MODULE_SOCK_IP
36 sock_ip_cb_t ip;
37#endif
38#ifdef MODULE_SOCK_TCP
39 sock_tcp_cb_t tcp;
40 sock_tcp_queue_cb_t tcp_queue;
41#endif
42#ifdef MODULE_SOCK_UDP
43 sock_udp_cb_t udp;
44#endif
46
57
65
66#ifdef __cplusplus
67}
68#endif
69
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:130
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:154
sock_async_flags_t
Flag types to signify asynchronous sock events.
Definition types.h:34
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:114
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:88
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:65
struct PTRTAG event_queue_t
event queue structure
struct event event_t
event structure forward declaration
Definition event.h:132
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.
void(* generic)(void *, sock_async_flags_t, void *)
anything goes