/// <inheritdoc cref="IServerConnection"/> public void Connect(CasparCGConnectionSettings settings) { if (IsConnected && settings.Equals(ConnectionSettings)) { Disconnect(); } ConnectionSettings = settings; Connect(); }
/// <summary> /// Ctor /// </summary> /// <param name="settings">Settings to connect to the CasparCG Server</param> public ServerConnection(CasparCGConnectionSettings settings) { ConnectionSettings = settings; Client.AutoTrimStrings = true; Client.SendDelimiter = LineDelimiter; Client.AutoReconnect = settings.AutoConnect; Client.CheckConnectivityInterval = settings.ReconnectInterval; Client.ConnectedEvent += Client_ConnectedEvent; Client.DisconnectedEvent += Client_DisconnectedEvent; Client.DataReceived += Client_DataReceived; }