Class IceServer
An ICE server.
Inheritance
Inherited Members
Namespace: FM.LiveSwitch
Assembly: FM.LiveSwitch.dll
Syntax
public class IceServer
Constructors
IceServer(String)
Initializes a new instance of the Ice
Declaration
public IceServer(string url)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | The URL. |
IceServer(String, String, String)
Initializes a new instance of the Ice
Declaration
public IceServer(string url, string username, string password)
Parameters
Type | Name | Description |
---|---|---|
System. |
url | The URL. |
System. |
username | The username. |
System. |
password | The password. |
Properties
DefaultPort
Gets the default non-secure port (in use for STUN and TURN).
Declaration
[Obsolete("Use DefaultStunPort, DefaultTurnPort, DefaultStunsPort, or DefaultTurnsPort instead.")]
public static int DefaultPort { get; }
Property Value
Type | Description |
---|---|
System. |
DefaultStunPort
Gets the default STUN port.
Declaration
public static int DefaultStunPort { get; }
Property Value
Type | Description |
---|---|
System. |
DefaultStunsPort
Gets the default STUNS port.
Declaration
public static int DefaultStunsPort { get; }
Property Value
Type | Description |
---|---|
System. |
DefaultTurnPort
Gets the default TURN port.
Declaration
public static int DefaultTurnPort { get; }
Property Value
Type | Description |
---|---|
System. |
DefaultTurnsPort
Gets the default TURNS port.
Declaration
public static int DefaultTurnsPort { get; }
Property Value
Type | Description |
---|---|
System. |
Host
Gets the host.
Declaration
public string Host { get; }
Property Value
Type | Description |
---|---|
System. |
IsSecure
Gets a value indicating whether this represents a secure STUN or TURN server.
Declaration
public bool IsSecure { get; }
Property Value
Type | Description |
---|---|
System. |
IsStun
Gets a value indicating whether this represents a STUN server.
Declaration
public bool IsStun { get; }
Property Value
Type | Description |
---|---|
System. |
IsTcp
Gets a value indicating whether this represents a TCP server.
Declaration
public bool IsTcp { get; }
Property Value
Type | Description |
---|---|
System. |
IsTurn
Gets a value indicating whether this represents a TURN server.
Declaration
public bool IsTurn { get; }
Property Value
Type | Description |
---|---|
System. |
IsUdp
Gets a value indicating whether this represents a UDP server.
Declaration
public bool IsUdp { get; }
Property Value
Type | Description |
---|---|
System. |
Password
Gets or sets the password.
Declaration
public string Password { get; }
Property Value
Type | Description |
---|---|
System. |
Port
Gets the port.
Declaration
public int Port { get; }
Property Value
Type | Description |
---|---|
System. |
Url
Gets or sets the URL.
Declaration
public string Url { get; }
Property Value
Type | Description |
---|---|
System. |
Username
Gets or sets the username.
Declaration
public string Username { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
FromJson(String)
Deserializes an instance from JSON.
Declaration
public static IceServer FromJson(string iceServerJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
iceServerJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Ice |
The deserialized ICE server. |
FromJsonArray(String)
Deserializes an array of instances from JSON.
Declaration
public static IceServer[] FromJsonArray(string iceServersJson)
Parameters
Type | Name | Description |
---|---|---|
System. |
iceServersJson | The JSON to deserialize. |
Returns
Type | Description |
---|---|
Ice |
The deserialized ICE server array. |
ToJson()
Serializes this instance to JSON.
Declaration
public string ToJson()
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToJson(IceServer)
Serializes an instance to JSON.
Declaration
public static string ToJson(IceServer iceServer)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServer | The ICE server. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |
ToJsonArray(IceServer[])
Serializes an array of instances to JSON.
Declaration
public static string ToJsonArray(IceServer[] iceServers)
Parameters
Type | Name | Description |
---|---|---|
Ice |
iceServers | The ICE servers. |
Returns
Type | Description |
---|---|
System. |
The serialized JSON. |