|
ascii-chat 0.8.38
Real-time terminal-based video chat with ASCII art conversion
|
Session string generation and validation implementation. More...
Go to the source code of this file.
Data Structures | |
| struct | word_cache_entry_t |
| Hashtable entry for cached word lookups. More... | |
Functions | |
| void | acds_strings_destroy (void) |
| Cleanup function for session string cache Called by asciichat_shared_destroy() during library cleanup. Safe to call multiple times (idempotent). | |
| asciichat_error_t | acds_string_init (void) |
| asciichat_error_t | acds_string_generate (char *output, size_t output_size) |
| bool | is_session_string (const char *str) |
Session string generation and validation implementation.
This module generates memorable session strings in the format: adjective-noun-noun (e.g., "swift-river-mountain")
It maintains cached hashtables of adjectives and nouns for fast O(1) validation, ensuring session strings only contain real words.
Definition in file discovery/strings.c.
| asciichat_error_t acds_string_generate | ( | char * | output, |
| size_t | output_size | ||
| ) |
Definition at line 192 of file discovery/strings.c.
References adjectives, adjectives_count, nouns, nouns_count, and safe_snprintf().
Referenced by database_session_create(), options_preset_unified(), and server_main().
| asciichat_error_t acds_string_init | ( | void | ) |
Definition at line 183 of file discovery/strings.c.
Referenced by acds_main().
| void acds_strings_destroy | ( | void | ) |
Cleanup function for session string cache Called by asciichat_shared_destroy() during library cleanup. Safe to call multiple times (idempotent).
Definition at line 54 of file discovery/strings.c.
References word_cache_entry_t::word.
Referenced by asciichat_shared_destroy().
| bool is_session_string | ( | const char * | str | ) |
Definition at line 221 of file discovery/strings.c.
References utf8_is_ascii_only().
Referenced by database_session_create(), discover_session_parallel(), and parse_client_address().