---
title: NWProtocolFramer.Instance
framework: network
role: symbol
role_heading: Class
path: network/nwprotocolframer/instance
---

# NWProtocolFramer.Instance

An object that represents a single instance of your custom protocol running in a connection.

## Declaration

```swift
final class Instance
```

## Overview

Overview All interaction between your protocol and the connection occurs through this object.

## Topics

### Writing Output

- [parseOutput(minimumIncompleteLength:maximumLength:parse:)](network/nwprotocolframer/instance/parseoutput(minimumincompletelength:maximumlength:parse:).md)
- [writeOutput(data:)](network/nwprotocolframer/instance/writeoutput(data:)-ydvk.md)
- [writeOutputNoCopy(length:)](network/nwprotocolframer/instance/writeoutputnocopy(length:).md)
- [passThroughOutput()](network/nwprotocolframer/instance/passthroughoutput().md)

### Delivering Input

- [parseInput(minimumIncompleteLength:maximumLength:parse:)](network/nwprotocolframer/instance/parseinput(minimumincompletelength:maximumlength:parse:).md)
- [deliverInput(data:message:isComplete:)](network/nwprotocolframer/instance/deliverinput(data:message:iscomplete:).md)
- [deliverInputNoCopy(length:message:isComplete:)](network/nwprotocolframer/instance/deliverinputnocopy(length:message:iscomplete:).md)
- [passThroughInput()](network/nwprotocolframer/instance/passthroughinput().md)

### Managing Instance Lifetime

- [markReady()](network/nwprotocolframer/instance/markready().md)
- [markFailed(error:)](network/nwprotocolframer/instance/markfailed(error:).md)
- [prependApplicationProtocol(options:)](network/nwprotocolframer/instance/prependapplicationprotocol(options:).md)

### Inspecting Instance Properties

- [remote](network/nwprotocolframer/instance/remote.md)
- [local](network/nwprotocolframer/instance/local.md)
- [parameters](network/nwprotocolframer/instance/parameters.md)

### Handling Asynchronous Events

- [async(execute:)](network/nwprotocolframer/instance/async(execute:).md)
- [scheduleWakeup(wakeupTime:)](network/nwprotocolframer/instance/schedulewakeup(wakeuptime:).md)
- [NWProtocolFramer.Instance.WakeupTime](network/nwprotocolframer/instance/wakeuptime.md)

### Instance Properties

- [options](network/nwprotocolframer/instance/options.md)

### Instance Methods

- [prependApplicationProtocolIgnoringReady(options:)](network/nwprotocolframer/instance/prependapplicationprotocolignoringready(options:).md)
- [writeOutput(data:)](network/nwprotocolframer/instance/writeoutput(data:)-9axn3.md)

## Relationships

### Conforms To

- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Implementing Framer Protocols

- [NWProtocolFramerImplementation](network/nwprotocolframerimplementation.md)
