---
title: receivePort
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/portmessage/receiveport
---

# receivePort

For an outgoing message, returns the port on which replies to the receiver will arrive. For an incoming message, returns the port the receiver did arrive on.

## Declaration

```swift
var receivePort: Port? { get }
```

## Return Value

Return Value For an outgoing message, the port on which replies to the receiver will arrive. For an incoming message, the port the receiver did arrive on.

## See Also

### Getting the Ports

- [sendPort](foundation/portmessage/sendport.md)
