|
| static int | anj_net_create_ctx (anj_net_binding_type_t type, anj_net_ctx_t **ctx, const anj_net_config_t *config) |
| |
| static int | anj_net_connect (anj_net_binding_type_t type, anj_net_ctx_t *ctx, const char *hostname, const char *port) |
| |
| static int | anj_net_send (anj_net_binding_type_t type, anj_net_ctx_t *ctx, size_t *bytes_sent, const uint8_t *buf, size_t length) |
| |
| static int | anj_net_recv (anj_net_binding_type_t type, anj_net_ctx_t *ctx, size_t *bytes_received, uint8_t *buf, size_t length) |
| |
| static int | anj_net_close (anj_net_binding_type_t type, anj_net_ctx_t *ctx) |
| |
| static int | anj_net_shutdown (anj_net_binding_type_t type, anj_net_ctx_t *ctx) |
| |
| static int | anj_net_cleanup_ctx (anj_net_binding_type_t type, anj_net_ctx_t **ctx) |
| |
| static int | anj_net_get_inner_mtu (anj_net_binding_type_t type, anj_net_ctx_t *ctx, int32_t *out_value) |
| |
| static int | anj_net_get_state (anj_net_binding_type_t type, anj_net_ctx_t *ctx, anj_net_socket_state_t *out_value) |
| |
| static int | anj_net_queue_mode_rx_off (anj_net_binding_type_t type, anj_net_ctx_t *ctx) |
| |
Thin dispatch layer for network backends.
This header provides inline wrappers that route generic anj_net_api.h calls (create, connect, send, recv, etc.) to the selected transport backend:
- UDP
- TCP
- DTLS
- TLS
- Non-IP bindings
Which backends are compiled in is controlled via ANJ_NET_WITH_* macros. Each wrapper chooses the appropriate implementation or returns ANJ_NET_ENOTSUP if not available.
This lets the core code call a uniform API, while integrators can enable/disable specific transports at build time.