ascii-chat
Binary v0.15.83-53-gb711d8720
Library lib/v0.3.2-701-gb711d8720
Video chat in your terminal
Loading...
Searching...
No Matches
url.h File Reference

🌐 Production-Grade URL Validation and Parsing More...

Go to the source code of this file.

Data Structures

struct  url_parts_t
 Structure containing parsed URL components. More...

Functions

asciichat_error_t hostname_to_ascii (const char *hostname, char *output, size_t capacity)
bool url_is_valid (const char *url)
 URL validation using shared parsing and ICU hostname checks.
asciichat_error_t url_parse (const char *url, url_parts_t *parts_out)
 Parse HTTP(S), WebSocket, and TCP URL into components.
void url_parts_destroy (url_parts_t *parts)
 Free parsed URL components.
bool url_is_websocket_scheme (const char *scheme)
 Check if URL scheme is WebSocket (ws or wss).
bool url_is_websocket (const char *url)
 Check if a URL string is a valid WebSocket URL.
bool url_looks_like_websocket (const char *url)
 Quick check if a string is a WebSocket URL.
bool url_is_tcp_scheme (const char *scheme)
 Check if URL scheme is TCP.
bool url_is_tcp (const char *url)
 Check if a URL string is a valid TCP URL.
bool url_looks_like_tcp (const char *url)
 Quick check if a string is a TCP URL.
void url_redact_diagnostic (char *text, bool truncated)

Detailed Description

🌐 Production-Grade URL Validation and Parsing

Definition in file url.h.