Type Alias

nw_endpoint_t

A local or remote endpoint in a network connection.

Declaration

typealias nw_endpoint_t = OS_nw_endpoint

Topics

Endpoint Types

struct nw_endpoint_type_t

The type of a network endpoint, such as a host or a service.

Host Endpoints

func nw_endpoint_create_host(UnsafePointer<Int8>, UnsafePointer<Int8>) -> nw_endpoint_t

Creates a network endpoint with a hostname and port, where the hostname may be interpreted as an IP address.

func nw_endpoint_get_port(nw_endpoint_t) -> UInt16

Accesses the port stored in an endpoint, in host-byte order.

Address Endpoints

func nw_endpoint_create_address(UnsafePointer<sockaddr>) -> nw_endpoint_t

Creates a network endpoint with an address structure.

func nw_endpoint_get_address(nw_endpoint_t) -> UnsafePointer<sockaddr>

Accesses the address structure stored in an address endpoint.

Bonjour Service Endpoints

func nw_endpoint_get_bonjour_service_name(nw_endpoint_t) -> UnsafePointer<Int8>

Accesses the Bonjour service name stored in an endpoint.

func nw_endpoint_get_bonjour_service_type(nw_endpoint_t) -> UnsafePointer<Int8>

Accesses the Bonjour service type stored in an endpoint.

func nw_endpoint_get_bonjour_service_domain(nw_endpoint_t) -> UnsafePointer<Int8>

Accesses the Bonjour service domain stored in an endpoint.

URL Endpoints

func nw_endpoint_create_url(UnsafePointer<Int8>) -> nw_endpoint_t

Creates a network endpoint with a URL string.

func nw_endpoint_get_url(nw_endpoint_t) -> UnsafePointer<Int8>

Accesses the URL string stored in an endpoint.