---
title: "nw_relay_hop_create(_:_:_:)"
framework: network
role: symbol
role_heading: Function
path: "network/nw_relay_hop_create(_:_:_:)"
---

# nw_relay_hop_create(_:_:_:)

Creates a configuration for a secure relay accessible using HTTP/3, with an optional HTTP/2 fallback.

## Declaration

```swift
func nw_relay_hop_create(_ http3_relay_endpoint: nw_endpoint_t?, _ http2_relay_endpoint: nw_endpoint_t?, _ relay_tls_options: nw_protocol_options_t?) -> nw_relay_hop_t
```

## Parameters

- `http3_relay_endpoint`: A URL or host endpoint identifying the relay server accessible using HTTP/3.
- `http2_relay_endpoint`: An optional URL or host endpoint identifying the relay server accessible using HTTP/2. This can be the same endpoint as http3_relay_endpoint.
- `relay_tls_options`: The TLS options to use for the TLS handshake to the relay.

## Return Value

Return Value An initialized relay hop object.

## See Also

### Configuring Relay Hops

- [nw_relay_hop_add_additional_http_header_field(_:_:_:)](network/nw_relay_hop_add_additional_http_header_field(_:_:_:).md)
