Class AllocationUtils
Utility methods for relay allocations
Inheritance
object
AllocationUtils
Namespace: Unity.Services.Relay.Models
Assembly: solution.dll
Syntax
public static class AllocationUtils
Methods
ToRelayServerData(Allocation, string)
Convert an allocation to Transport's RelayServerData model.
Declaration
public static RelayServerData ToRelayServerData(this Allocation allocation, string connectionType)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocation | allocation | Allocation from which to create the server data. |
| string | connectionType | Type of connection to use ( |
Returns
| Type | Description |
|---|---|
| RelayServerData | Relay server data model for Transport. |
ToRelayServerData(Allocation, RelayProtocol)
Convert an allocation to Transport's RelayServerData model.
Declaration
public static RelayServerData ToRelayServerData(this Allocation allocation, RelayProtocol connectionType)
Parameters
| Type | Name | Description |
|---|---|---|
| Allocation | allocation | Allocation from which to create the server data. |
| RelayProtocol | connectionType |
Returns
| Type | Description |
|---|---|
| RelayServerData | Relay server data model for Transport. |
ToRelayServerData(JoinAllocation, string)
Convert an allocation to Transport's RelayServerData model.
Declaration
public static RelayServerData ToRelayServerData(this JoinAllocation allocation, string connectionType)
Parameters
| Type | Name | Description |
|---|---|---|
| JoinAllocation | allocation | Allocation from which to create the server data. |
| string | connectionType | Type of connection to use ( |
Returns
| Type | Description |
|---|---|
| RelayServerData | Relay server data model for Transport. |
ToRelayServerData(JoinAllocation, RelayProtocol)
Convert an allocation to Transport's RelayServerData model.
Declaration
public static RelayServerData ToRelayServerData(this JoinAllocation allocation, RelayProtocol connectionType)
Parameters
| Type | Name | Description |
|---|---|---|
| JoinAllocation | allocation | Allocation from which to create the server data. |
| RelayProtocol | connectionType |
Returns
| Type | Description |
|---|---|
| RelayServerData | Relay server data model for Transport. |