pdcomm_tcp_event_info
Function
Decodes the kind, codes, header, and token of an event.
PdcommStatus pdcomm_tcp_event_info(const PdcommTcpEvent *event, PdcommTcpEventInfo *info)Parameters
| Name | Description |
|---|---|
event | Live event. |
info | Caller storage. Set info->struct_size to sizeof(PdcommTcpEventInfo) or larger before the call; on success every known field is written (inapplicable fields as 0) and struct_size is set to the size written. Trailing bytes of a larger structure are not touched. |
Returns
#PDCOMM_OK on success; #PDCOMM_INVALID_ARGUMENT when event or info is NULL or info->struct_size is too small (nothing is written); #PDCOMM_INTERNAL_ERROR when a panic was contained.
Notes
- Thread safety: read calls on the same event may run concurrently; destruction must be synchronized with them.