/// <summary>
 /// Initializes a new OVPNCommunicator object.
 /// </summary>
 /// <param name="host">Host to connect to (127.0.0.1)</param>
 /// <param name="port">Port to connect to</param>
 /// <param name="logs">Log manager</param>
 /// <param name="ovpn">Parent object</param>
 public OVPNCommunicator(string host, int port,
     OVPNLogManager logs, OVPNConnection ovpn) 
 {
     m_host = host;
     m_port = port;
     m_logs = logs;
     m_ovpn = ovpn;
     m_tcpC = new TcpClient();
 }
 /// <summary>
 /// Initializes a new OVPNCommunicator object.
 /// </summary>
 /// <param name="host">Host to connect to (127.0.0.1)</param>
 /// <param name="port">Port to connect to</param>
 /// <param name="logs">Log manager</param>
 /// <param name="ovpn">Parent object</param>
 public OVPNCommunicator(string host, int port,
                         OVPNLogManager logs, OVPNConnection ovpn)
 {
     m_host = host;
     m_port = port;
     m_logs = logs;
     m_ovpn = ovpn;
     m_tcpC = new TcpClient();
 }
Пример #3
0
        /// <summary>
        /// Creates a new ManagementLogic object.
        /// </summary>
        /// <param name="ovpn">parent</param>
        /// <param name="host">host to connect to (e.g. 127.0.0.1)</param>
        /// <param name="port">port to connect to</param>
        /// <param name="logs">LogManager to write the logs to</param>
        public OVPNManagementLogic(OVPNConnection ovpn,string host,
                                   int port,OVPNLogManager logs)
        {
            m_ovpn        = ovpn;
            m_logs        = logs;
            m_releaselock = true;

            // initialize required components
            m_ovpnComm      = new OVPNCommunicator(host,port,logs,ovpn);
            m_ovpnMParser   = new OVPNManagementParser(m_ovpnComm,this,logs);
            m_pkcs11details = new List <PKCS11Detail>();

            m_ovpnComm.connectionClosed += new System.EventHandler(m_ovpnComm_connectionClosed);
        }
Пример #4
0
 /// <summary>
 /// Initializes a new OVPNLogManager object.
 /// </summary>
 /// <param name="parent">the parent</param>
 internal OVPNLogManager(OVPNConnection parent)
 {
     m_ovpn = parent;
 }
        /// <summary>
        /// Creates a new ManagementLogic object.
        /// </summary>
        /// <param name="ovpn">parent</param>
        /// <param name="host">host to connect to (e.g. 127.0.0.1)</param>
        /// <param name="port">port to connect to</param>
        /// <param name="logs">LogManager to write the logs to</param>
        public OVPNManagementLogic(OVPNConnection ovpn, string host,
            int port, OVPNLogManager logs)
        {
            m_ovpn = ovpn;
            m_logs = logs;
            m_releaselock = true;

            // initialize required components
            m_ovpnComm = new OVPNCommunicator(host, port, logs, ovpn);
            m_ovpnMParser = new OVPNManagementParser(m_ovpnComm, this, logs);
            m_pkcs11details = new List<PKCS11Detail>();

            m_ovpnComm.connectionClosed += new System.EventHandler(m_ovpnComm_connectionClosed);
        }
Пример #6
0
 /// <summary>
 /// Initializes a new OVPNLogManager object.
 /// </summary>
 /// <param name="parent">the parent</param>
 internal OVPNLogManager(OVPNConnection parent)
 {
     m_ovpn = parent;
 }