<!--
{
  "availability" : [
    "iOS: 4.2.0 -",
    "iPadOS: 4.2.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.15.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreMIDI",
  "identifier" : "/documentation/CoreMIDI/MIDINetworkHost",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core MIDI"
    ],
    "preciseIdentifier" : "c:objc(cs)MIDINetworkHost"
  },
  "title" : "MIDINetworkHost"
}
-->

# MIDINetworkHost

An object that represents the host’s network address.

```
class MIDINetworkHost
```

## Topics

### Creating Network Hosts

[`+  hostWithName:address:port:`](/documentation/CoreMIDI/MIDINetworkHost/init(name:address:port:))

Creates a host with the specified name, adress, and port.

[`+  hostWithName:netService:`](/documentation/CoreMIDI/MIDINetworkHost/init(name:netService:))

Creates a host with the specified name and net service.

[`+  hostWithName:netServiceName:netServiceDomain:`](/documentation/CoreMIDI/MIDINetworkHost/init(name:netServiceName:netServiceDomain:))

Creates a host with the specified name, net service name, and domain.

[`MIDINetworkBonjourServiceType`](/documentation/CoreMIDI/MIDINetworkBonjourServiceType)

The Bonjour service type.

### Inspecting Host Properties

[`name`](/documentation/CoreMIDI/MIDINetworkHost/name)

The host name.

[`netServiceName`](/documentation/CoreMIDI/MIDINetworkHost/netServiceName)

The net service name.

[`netServiceDomain`](/documentation/CoreMIDI/MIDINetworkHost/netServiceDomain)

The net service domain.

[`address`](/documentation/CoreMIDI/MIDINetworkHost/address)

The host address.

[`port`](/documentation/CoreMIDI/MIDINetworkHost/port)

The host port.

### Comparing Hosts

[`-  hasSameAddressAs:`](/documentation/CoreMIDI/MIDINetworkHost/hasSameAddress(as:))

Compares this host instance with another to see if they share the same address value.

## Relationships

### Conforms To

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

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

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

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

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

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

### Inherits From

[`NSObject-swift.class`](/documentation/ObjectiveC/NSObject-swift.class)

---

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)