Пример #1
0
        public NativeMethods.ovpn3_transport_stats GetTransportStats()
        {
            lock (m_clientSync)
            {
                if (m_client == null)
                {
                    throw new Exception("client not initialized");
                }

                NativeMethods.ovpn3_transport_stats stats = new NativeMethods.ovpn3_transport_stats();
                if (!m_client.GetTransportStats(ref stats))
                {
                    throw new Exception("failed to get transport stats");
                }

                return(stats);
            }
        }