using System; using System.Collections.Generic; using System.Linq; using System.Text; using Crestron.SimplSharp; namespace PepperDash.Core { /// /// Tcp Server Config object with properties for a tcp server with shared key and heartbeat capabilities /// public class TcpServerConfigObject { /// /// Uique key /// public string Key { get; set; } /// /// Max Clients that the server will allow to connect. /// public ushort MaxClients { get; set; } /// /// Bool value for secure. Currently not implemented in TCP sockets as they are not dynamic /// public bool Secure { get; set; } /// /// Port for the server to listen on /// public int Port { get; set; } /// /// Require a shared key that both server and client negotiate. If negotiation fails server disconnects the client /// public bool SharedKeyRequired { get; set; } /// /// The shared key that must match on the server and client /// public string SharedKey { get; set; } /// /// Require a heartbeat on the client/server connection that will cause the server/client to disconnect if the heartbeat is not received. /// heartbeats do not raise received events. /// public bool HeartbeatRequired { get; set; } /// /// The interval in seconds for the heartbeat from the client. If not received client is disconnected /// public ushort HeartbeatRequiredIntervalInSeconds { get; set; } /// /// HeartbeatString that will be checked against the message received. defaults to heartbeat if no string is provided. /// public string HeartbeatStringToMatch { get; set; } /// /// Client buffer size. See Crestron help. defaults to 2000 if not greater than 2000 /// public int BufferSize { get; set; } /// /// Receive Queue size must be greater than 20 or defaults to 20 /// public int ReceiveQueueSize { get; set; } } }