示例#1
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                Console.WriteLine("NPing <host-address> <counter>");
            }

            if (args.Length < 2)
            {
            }

            CPing ping = new CPing();
        }
示例#2
0
        public MainPage()
        {
            this.InitializeComponent();


            ConnectionProfile InternetConnectionProfile = NetworkInformation.GetInternetConnectionProfile();

            if (InternetConnectionProfile != null)
            {
                tetheringManager = NetworkOperatorTetheringManager.CreateFromConnectionProfile(InternetConnectionProfile);
                switch (tetheringManager.TetheringOperationalState)
                {
                case TetheringOperationalState.On:
                    switchTethering.IsOn = true;
                    break;

                default:
                    switchTethering.IsOn = false;
                    break;
                }
            }
            CPing ping = new CPing();
        }
示例#3
0
 void PingListener(User user, CPing packet)
 {
     Send(user, new SPPingReply());
     user.KeepAlive = 0;
 }