|
Serene Runtime 1.0.0-dev
C runtime for the Serene programming language
|
A completion, the result of one submission, echoed back on the channel. More...
#include <reactor.h>
Data Fields | |
| ERROR_HEADER | |
| void * | fiber_data |
| The fiber_data of the submission this completes. | |
| size_t | result |
| The result of the operation on success, bytes transferred for the transfers, the accepted descriptor for SRN_REACTOR_IO_ACCEPT, 0 for SRN_REACTOR_IO_CONNECT and SRN_REACTOR_IO_NOP. | |
| uint32_t | addrlen |
| For SRN_REACTOR_IO_ACCEPT and SRN_REACTOR_IO_RECVFROM, the actual length of the address written into the request's addr (the kernel's value-result addrlen), which lets a caller interpret a variable or mixed-family address (IPv6, Unix-domain, a dual-stack listener). | |
A completion, the result of one submission, echoed back on the channel.
It is a fallible value (see errors.h). maybe_error is null on success and points at the failure otherwise, so result/addrlen are meaningful only when there is no error. The backend sets maybe_error from a static IO error to avoid unnecessary memory allocation.
| uint32_t srn_reactor_io_completion_t::addrlen |
For SRN_REACTOR_IO_ACCEPT and SRN_REACTOR_IO_RECVFROM, the actual length of the address written into the request's addr (the kernel's value-result addrlen), which lets a caller interpret a variable or mixed-family address (IPv6, Unix-domain, a dual-stack listener).
The consumer knows its op, so it reads this only for those two; unused otherwise.
| void* srn_reactor_io_completion_t::fiber_data |
The fiber_data of the submission this completes.
| size_t srn_reactor_io_completion_t::result |