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_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
 Canonical ASCII 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.

Structure containing parsed URL components

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

Definition at line 65 of file url.h.

Field Documentation

◆ host

char* url_parts_t::host

Canonical ASCII hostname or IP address (allocated).

Definition at line 68 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 69 of file url.h.

Referenced by 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 71 of file url.h.

Referenced by 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 70 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 66 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 67 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: