/// <summary> /// Constructor /// Use StartClient() to start a connection to a server. /// </summary> protected SocketClient() { KeepAliveTimer = new System.Timers.Timer(15000); KeepAliveTimer.Elapsed += KeepAlive; KeepAliveTimer.AutoReset = true; KeepAliveTimer.Enabled = false; IsRunning = false; AllowReceivingFiles = false; ByteCompressor = new DeflateByteCompression(); MessageEncryption = new Aes256(); FileCompressor = new GZipCompression(); FolderCompressor = new ZipCompression(); }
/// <summary> /// Base constructor /// </summary> protected ServerListener() { //Set timer that checks all clients every 5 minutes _keepAliveTimer = new System.Timers.Timer(300000); _keepAliveTimer.Elapsed += KeepAlive; _keepAliveTimer.AutoReset = true; _keepAliveTimer.Enabled = true; WhiteList = new List <IPAddress>(); BlackList = new List <IPAddress>(); IsRunning = false; AllowReceivingFiles = false; ByteCompressor = new DeflateByteCompression(); MessageEncryption = new Aes256(); FileCompressor = new GZipCompression(); FolderCompressor = new ZipCompression(); }