---
title: NETunnelProviderSession
framework: networkextension
role: symbol
role_heading: Class
path: networkextension/netunnelprovidersession
---

# NETunnelProviderSession

An object to start and stop a tunnel connection and get its status.

## Declaration

```swift
class NETunnelProviderSession
```

## Overview

Overview NETunnelProviderSession objects control network tunnel connections provided by Tunnel Provider extensions. NETunnelProviderSession objects are not instantiated directly. Instead, each NETunnelProviderManager object has an associated NETunnelProviderSession as a read-only property.

## Topics

### Controlling the tunnel connection

- [startTunnel(options:)](networkextension/netunnelprovidersession/starttunnel(options:).md)
- [stopTunnel()](networkextension/netunnelprovidersession/stoptunnel().md)

### Communicating with the tunnel provider

- [sendProviderMessage(_:responseHandler:)](networkextension/netunnelprovidersession/sendprovidermessage(_:responsehandler:).md)

## Relationships

### Inherits From

- [NEVPNConnection](networkextension/nevpnconnection.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### VPN control

- [NEVPNConnection](networkextension/nevpnconnection.md)
