Exemplo n.º 1
0
        public void Dispose()
        {
            if (slaveClientLazy != null)
            {
                slaveClientLazy.InputProtocol.Transport.Close();
                slaveClientLazy = null;
            }

            if (masterClientLazy != null)
            {
                masterClientLazy.InputProtocol.Transport.Close();
                masterClientLazy = null;
            }
        }
Exemplo n.º 2
0
        public VMToolSlaveCustom.Client GetSlaveClient()
        {
            CheckProfileCanResolveSlave();

            if (slaveClientLazy == null)
            {
                string slave = profile.Slave != null ? profile.Slave : GetIP();
                Log(string.Format("Connecting to slave server '{0}:{1}'.", slave, profile.SlavePort));

                TTransport transport = OpenTransport(slave, profile.SlavePort);
                TProtocol protocol = new TBinaryProtocol(transport);
                slaveClientLazy = new VMToolSlaveCustom.Client(protocol);
            }

            return slaveClientLazy;
        }