---
title: "startReceive(_:)"
framework: network
role: symbol
role_heading: Instance Method
path: "network/networkchannel/startreceive(_:)"
---

# startReceive(_:)

Receive partial data from a connection.

## Declaration

```swift
func startReceive(_ handler: ((Int, Int) async throws -> ApplicationProtocol.Message<Data>) async throws -> Void) async throws
```

## Parameters

- `handler`: Called immediately after invoking startReceive. Use the receive closure to keep receiving partial data until the message is complete.

## Discussion

Discussion Use this to receive large amounts of data or data that can be processed incrementally. This may be called before the connection is ready, in which case the receive request will be enqueued until the connection is ready.
