2017-01-21 18:13:42 +00:00
|
|
|
|
using System;
|
|
|
|
|
using Newtonsoft.Json;
|
|
|
|
|
|
|
|
|
|
namespace Nibriboard.Client
|
|
|
|
|
{
|
|
|
|
|
public class ClientSettings
|
|
|
|
|
{
|
2017-05-04 18:53:38 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether the WebSocket is secure.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public bool SecureWebSocket = false;
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The protocol to use over the WebSocket.
|
|
|
|
|
/// </summary>
|
|
|
|
|
public string WebsocketProtocol = "RippleLink";
|
|
|
|
|
|
|
|
|
|
public int WebSocketPort;
|
|
|
|
|
public string WebSocketHost = "localhost";
|
|
|
|
|
public string WebSocketPath;
|
2017-01-21 18:13:42 +00:00
|
|
|
|
|
|
|
|
|
public string WebsocketUri {
|
|
|
|
|
get {
|
2017-05-04 18:53:38 +00:00
|
|
|
|
return (SecureWebSocket ? "wss" : "ws") + $"://{WebSocketHost}:{WebSocketPort}{WebSocketPath}";
|
2017-01-21 18:13:42 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public ClientSettings()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|