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

# msgid

Returns the identifier for the receiver.

## Declaration

```swift
var msgid: UInt32 { get set }
```

## Return Value

Return Value The identifier for the receiver.

## Discussion

Discussion Cooperating applications can use this to define different types of messages, such as connection requests, RPCs, errors, and so on.
