|
Udipe 1.0
Solving the riddle of high-throughput UDP
|
#include <result.h>
Data Fields | ||
| union { | ||
| udipe_network_payload_t network | ||
| udipe_custom_payload_t custom | ||
| udipe_unordered_payload_t unordered | ||
| udipe_timer_repeat_payload_t timer_repeat | ||
| } | payload | |
| udipe_result_type_t | type | |
Generic result type
This type can encapsulate the result of any libudipe command, as well as an absence of result.
| union { ... } udipe_result_s::payload |
Result of the command, if any
type can be used to check whether there is a result, and if so what kind of payload it is.
| udipe_result_type_t udipe_result_s::type |
Command that returned this result, or sentinel value that indicates that this result is invalid and its payload shouldn't be processed.
Even when one is using infaillible wait commands, this field can be useful for debug assertions that a result is associated with the expected command type. It also enables having generic utilities that can handle all types of results.