Udipe 1.0
Solving the riddle of high-throughput UDP
Loading...
Searching...
No Matches
command.h
Go to the documentation of this file.
1#pragma once
2
34
35#include "connect.h"
36#include "context.h"
37#include "future.h"
38#include "nodiscard.h"
39#include "pointer.h"
40#include "result.h"
41#include "visibility.h"
42
43#include <assert.h>
44
45
46// TODO: document and implement
47//
48// TODO: Explain somewhere that a udipe connection is mostly like a POSIX socket
49// but may be implemented using multiple sockets under the hood.
54udipe_future_t* udipe_start_connect(udipe_context_t* context,
56
57// TODO: document
61udipe_connect_result_t udipe_connect(udipe_context_t* context,
63
64// TODO: document and implement
69udipe_future_t* udipe_start_disconnect(udipe_context_t* context,
70 udipe_disconnect_options_t options);
71
72// TODO: document
76udipe_disconnect_result_t udipe_disconnect(udipe_context_t* context,
77 udipe_disconnect_options_t options);
78
79// TODO: Add and implement
80/* // TODO: document and implement
81//
82// TODO: Should have GSO-like semantics, i.e. if you give a large enough buffer
83// then multiple datagrams may be sent. If GSO is disabled, then it just
84// sends a single datagram. Do not attempt to send more than 64 datagrams.
85UDIPE_NODISCARD
86UDIPE_NON_NULL_ARGS
87UDIPE_NON_NULL_RESULT
88UDIPE_PUBLIC
89udipe_future_t* udipe_start_send(udipe_context_t* context,
90 udipe_send_options_t options);
91
92// TODO: document
93UDIPE_NODISCARD
94UDIPE_NON_NULL_ARGS
95UDIPE_PUBLIC
96udipe_send_result_t udipe_send(udipe_context_t* context,
97 udipe_send_options_t options);
98
99// TODO: document and implement
100UDIPE_NODISCARD
101UDIPE_NON_NULL_ARGS
102UDIPE_NON_NULL_RESULT
103UDIPE_PUBLIC
104udipe_future_t* udipe_start_recv(udipe_context_t* context,
105 udipe_recv_options_t options);
106
107// TODO: document
108//
109// TODO: Should have GRO-like semantics, i.e. if you give a large enough buffer
110// then multiple datagrams may be received, and there will be anciliary
111// data telling you how large the inner segments are. If GRO is disabled,
112// then it just receives a single datagram.
113UDIPE_NODISCARD
114UDIPE_NON_NULL_ARGS
115UDIPE_PUBLIC
116udipe_recv_result_t udipe_recv(udipe_context_t* context,
117 udipe_recv_options_t options); */
Connection-related definitions.
Core libudipe context.
struct udipe_context_s udipe_context_t
Definition context.h:65
Asynchronous operation management.
struct udipe_future_s udipe_future_t
Definition future.h:231
Nodiscard polyfill.
#define UDIPE_NODISCARD
Definition nodiscard.h:20
Pointer shenanigans.
#define UDIPE_NON_NULL_ARGS
Definition pointer.h:17
#define UDIPE_NON_NULL_RESULT
Definition pointer.h:40
Generic result type.
Definition connect.h:86
Imported symbol visibility.
#define UDIPE_PUBLIC
Definition visibility.h:37