public KeepAlive(ManagerFormInterface _parent) { parent = _parent; running = true; command = "currentschandlerid"; KeepAliveTime = 1000 * 60 * 5; }
public TS3ClientHandler(Socket _connection, ManagerFormInterface _parent) { running = true; connection = _connection; netStream = new NetworkStream(connection, true); stream = netStream; parent = _parent; }
public RemoteHandler(Socket _connection, ManagerFormInterface _parent, Color _handlerColor, int _ID) { this.connection = _connection; netStream = new NetworkStream(connection, true); stream = netStream; parent = _parent; running = true; handlerColor = _handlerColor; ID = _ID; }
public SecureRemoteHandler(Socket _connection, ManagerFormInterface _parent, Color _handlerColor, int _ID, X509Certificate2 cert) : base(_connection, _parent, _handlerColor, _ID) { try { secureStream = new SslStream(this.netStream, false); secureStream.AuthenticateAsServer(cert, false, System.Security.Authentication.SslProtocols.Tls, false); stream = secureStream; String s = _connection.Connected.ToString(); String p = _connection.RemoteEndPoint.ToString(); Console.WriteLine("Cipher: {0} strength {1}", secureStream.CipherAlgorithm, secureStream.CipherStrength); Console.WriteLine("Hash: {0} strength {1}", secureStream.HashAlgorithm, secureStream.HashStrength); Console.WriteLine("Key exchange: {0} strength {1}", secureStream.KeyExchangeAlgorithm, secureStream.KeyExchangeStrength); Console.WriteLine("Protocol: {0}", secureStream.SslProtocol); Console.WriteLine("Is authenticated: {0} as server? {1}", secureStream.IsAuthenticated, secureStream.IsServer); Console.WriteLine("IsSigned: {0}", secureStream.IsSigned); Console.WriteLine("Is Encrypted: {0}", secureStream.IsEncrypted); Console.WriteLine("Can read: {0}, write {1}", secureStream.CanRead, secureStream.CanWrite); Console.WriteLine("Can timeout: {0}", secureStream.CanTimeout); } catch (AuthenticationException ex) { Console.WriteLine("Auth exception " + ex); if (ex.InnerException != null) { Console.WriteLine("Inner exception " + ex.InnerException); } } catch (IOException ex) { Console.WriteLine("IO exception " + ex); if (ex.InnerException != null) { Console.WriteLine("Inner exception " + ex.InnerException); } } catch (NotSupportedException ex) { Console.WriteLine("Not supported exception " + ex); if (ex.InnerException != null) { Console.WriteLine("Inner exception " + ex.InnerException); } } catch (Exception ex) { Console.WriteLine("Generic exception " + ex); if (ex.InnerException != null) { Console.WriteLine("Inner exception " + ex.InnerException); } } }
public RemoteUSBHandler(ManagerFormInterface _parent, Color _handlerColor, int _ID) { parent = _parent; handlerColor = _handlerColor; id = _ID; }
public ManagerHandler(ManagerFormInterface remoteManager, System.Drawing.Color managerColour) { this.remoteManager = remoteManager; this.managerColour = managerColour; }