ascii-chat
Binary v0.16.114-28-gf5913657f
Library lib/v0.3.2-3302-gf5913657f
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
char * host
 Canonical ASCII hostname or IP address (allocated).
char * ipv6
int port
 Extracted port number (0 if not specified).
char * path

Detailed Description

Structure containing parsed URL components.

Structure containing parsed URL components

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

Definition at line 73 of file url.h.

Field Documentation

◆ host

char* url_parts_t::host

Canonical ASCII hostname or IP address (allocated).

Definition at line 77 of file url.h.

Referenced by connection_endpoint_override_port(), 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 78 of file url.h.

Referenced by connection_endpoint_override_port(), connection_endpoint_resolve(), 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 81 of file url.h.

Referenced by connection_endpoint_override_port(), connection_endpoint_resolve(), 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 80 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 74 of file url.h.

Referenced by connection_endpoint_override_port(), 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 75 of file url.h.

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


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