ascii-chat 0.11.33
Video chat in your terminal
Loading...
Searching...
No Matches
url_parts_t Struct Reference

Structure containing parsed URL components. More...

#include <include/ascii-chat/util/url.h>

Data Fields

char * scheme
 Extracted scheme: "http" or "https" (allocated)
 
char * userinfo
 Optional userinfo (user:pass) - may be NULL (allocated if present)
 
char * host
 Extracted hostname or IP address (allocated)
 
char * ipv6
 IPv6 address if host is bracketed IPv6 - may be NULL (allocated if present)
 
int port
 Extracted port number (0 if not specified)
 
char * path
 Extracted path, query, and fragment (allocated if present, may be NULL)
 

Detailed Description

Structure containing parsed URL components.

Note
All string fields are allocated with SAFE_MALLOC() and must be freed by caller

Definition at line 57 of file url.h.

Field Documentation

◆ host

char* url_parts_t::host

Extracted hostname or IP address (allocated)

Definition at line 60 of file url.h.

Referenced by parse_public_key(), url_parse(), and url_parts_destroy().

◆ ipv6

char* url_parts_t::ipv6

IPv6 address if host is bracketed IPv6 - may be NULL (allocated if present)

Definition at line 61 of file url.h.

Referenced by url_parse(), and url_parts_destroy().

◆ path

char* url_parts_t::path

Extracted path, query, and fragment (allocated if present, may be NULL)

Definition at line 63 of file url.h.

Referenced by parse_public_key(), url_parse(), and url_parts_destroy().

◆ port

int url_parts_t::port

Extracted port number (0 if not specified)

Definition at line 62 of file url.h.

Referenced by url_parse(), and url_parts_destroy().

◆ scheme

char* url_parts_t::scheme

Extracted scheme: "http" or "https" (allocated)

Definition at line 58 of file url.h.

Referenced by url_is_tcp(), url_is_websocket(), url_parse(), and url_parts_destroy().

◆ userinfo

char* url_parts_t::userinfo

Optional userinfo (user:pass) - may be NULL (allocated if present)

Definition at line 59 of file url.h.

Referenced by url_parse(), and url_parts_destroy().


The documentation for this struct was generated from the following file: