---
title: "connect(context:)"
framework: Foveated Streaming
role: symbol
role_heading: Instance Method
platforms: [visionOS 27.0+]
path: "foveatedstreaming/foveatedstreamingextension/connect(context:)"
---

# connect(context:)

Connect to the provided endpoint.

## Declaration

```swift
@MainActor func connect(context: Self.Context) async throws
```

## Parameters

- `context`: An object used to communicate state back to the host app.

## Discussion

Discussion This is called when the session begins. Your extension should begin connecting to context.endpoint immediately. note: If the connection fails.  The error will be presented to the host app.
