# GetPort()

> Retrieves the port where the ChannelService runs. This port is chosen randomly when the ChannelService first starts. Alternatively you can specify the port from the command line, using the --ump-channel-service-port \<portNumber\> switch.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.MPE](/engine/6000.7/script-reference/unityeditor/mpe.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static int GetPort()
```

### Returns

| Type                                                       | Description                            |
| ---------------------------------------------------------- | -------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The port number of the ChannelService. |
