ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
url.c File Reference

Production-grade URL parsing and validation using PCRE2. More...

Go to the source code of this file.

Functions

bool url_is_valid (const char *url)
 Fast URL validation using production-grade regex (HTTP/HTTPS/WebSocket/TCP)
 
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.
 

Detailed Description

Production-grade URL parsing and validation using PCRE2.

Implements robust HTTP(S) URL validation using the production-grade regex by Diego Perini (MIT License), compiled with PCRE2 and JIT for high performance.

Definition in file url.c.