|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
mDNS service discovery implementation for ascii-chat More...
Go to the source code of this file.
Data Structures | |
| struct | asciichat_mdns_t |
| Internal mDNS context structure. More... | |
Macros | |
| #define | MDNS_BUFFER_SIZE (4 * 1024) |
| mDNS packet buffer size (4KB should handle most service records) | |
Functions | |
| asciichat_mdns_t * | asciichat_mdns_init (void) |
| void | asciichat_mdns_destroy (asciichat_mdns_t *mdns) |
| asciichat_error_t | asciichat_mdns_advertise (asciichat_mdns_t *mdns, const asciichat_mdns_service_t *service) |
| asciichat_error_t | asciichat_mdns_unadvertise (asciichat_mdns_t *mdns, const char *service_name) |
| asciichat_error_t | asciichat_mdns_query (asciichat_mdns_t *mdns, const char *service_type, asciichat_mdns_discovery_callback_fn callback, void *user_data) |
| asciichat_error_t | asciichat_mdns_update (asciichat_mdns_t *mdns, int timeout_ms) |
| int | asciichat_mdns_get_socket (asciichat_mdns_t *mdns) |
mDNS service discovery implementation for ascii-chat
Wraps the mdns library (https://github.com/mjansson/mdns) with ascii-chat specific API. This implementation provides service advertisement and discovery for LAN-based sessions.
Definition in file mdns.c.
| #define MDNS_BUFFER_SIZE (4 * 1024) |
| asciichat_error_t asciichat_mdns_advertise | ( | asciichat_mdns_t * | mdns, |
| const asciichat_mdns_service_t * | service | ||
| ) |
Definition at line 80 of file mdns.c.
Referenced by acds_main().
| void asciichat_mdns_destroy | ( | asciichat_mdns_t * | mdns | ) |
Definition at line 66 of file mdns.c.
References asciichat_mdns_t::buffer, and asciichat_mdns_t::socket_fd.
Referenced by acds_main(), discovery_mdns_query(), and server_main().
| int asciichat_mdns_get_socket | ( | asciichat_mdns_t * | mdns | ) |
Definition at line 284 of file mdns.c.
References asciichat_mdns_t::socket_fd.
| asciichat_mdns_t * asciichat_mdns_init | ( | void | ) |
Definition at line 35 of file mdns.c.
References asciichat_mdns_t::buffer, asciichat_mdns_t::buffer_capacity, MDNS_BUFFER_SIZE, and asciichat_mdns_t::socket_fd.
Referenced by acds_main(), discovery_mdns_query(), and server_main().
| asciichat_error_t asciichat_mdns_query | ( | asciichat_mdns_t * | mdns, |
| const char * | service_type, | ||
| asciichat_mdns_discovery_callback_fn | callback, | ||
| void * | user_data | ||
| ) |
Definition at line 224 of file mdns.c.
References asciichat_mdns_t::buffer, asciichat_mdns_t::buffer_capacity, asciichat_mdns_t::callback, asciichat_mdns_t::callback_data, asciichat_mdns_t::query_id, and asciichat_mdns_t::socket_fd.
Referenced by discovery_mdns_query().
| asciichat_error_t asciichat_mdns_unadvertise | ( | asciichat_mdns_t * | mdns, |
| const char * | service_name | ||
| ) |
Definition at line 98 of file mdns.c.
| asciichat_error_t asciichat_mdns_update | ( | asciichat_mdns_t * | mdns, |
| int | timeout_ms | ||
| ) |
Definition at line 260 of file mdns.c.
References asciichat_mdns_t::buffer, asciichat_mdns_t::buffer_capacity, asciichat_mdns_t::query_id, and asciichat_mdns_t::socket_fd.
Referenced by discovery_mdns_query().