<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -",
    "macOS: 14.0.0 -",
    "tvOS: 17.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Network",
  "identifier" : "/documentation/Network/nw_relay_hop_create(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Network"
    ],
    "preciseIdentifier" : "c:@F@nw_relay_hop_create"
  },
  "title" : "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.

```
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

An initialized relay hop object.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)