<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDIThruConnectionEndpoint",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:@S@MIDIThruConnectionEndpoint"
  },
  "title" : "MIDIThruConnectionEndpoint"
}
-->

# MIDIThruConnectionEndpoint

A source or destination in a MIDI thru connection.

```
struct MIDIThruConnectionEndpoint
```

## Overview

Set the endpoint’s [`uniqueID`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/uniqueID) to 0 if the endpoint exists and you’re passing its [`endpointRef`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/endpointRef). When retrieving a connection from Core MIDI, its [`endpointRef`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/endpointRef) may be `NULL` if it doesn’t exist, but the [`uniqueID`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/uniqueID) is always non-zero.

## Topics

### Configuring an Endpoint

[`uniqueID`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/uniqueID)

The connection’s unique identifier.

[`endpointRef`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/endpointRef)

The endpoint reference.

### Initializers

[`init()`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/init())

[`init(endpointRef:uniqueID:)`](/documentation/CoreMIDI/MIDIThruConnectionEndpoint/init(endpointRef:uniqueID:))

## Relationships

### Conforms To

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)