コード例 #1
0
ファイル: NATUPnP.cs プロジェクト: AadityaGupta/gea-PRISM
 private void OnDeviceFound(object sender, DeviceEventArgs args)
 {
     upnpdev = args.Device;
     //upnpdev.CreatePortMap(new Mapping(Protocol.Tcp, 4444, 4444));
     Rendezvous.GetInstance().PublishInfo(string.Format("{0} {1}",
                                                        upnpdev.GetExternalIP().ToString(), upnpdev.LocalAddress.ToString()));
 }
コード例 #2
0
        public static void Main(string[] args)
        {
            string username = Console.ReadLine();
            string password = Console.ReadLine();

            Console.Clear();
            if (HttpHandler.GetInstance().Login(username, password))
            {
                password = string.Empty;
                Console.WriteLine("Welcome to HashBully {0}!", username);
                Console.WriteLine("Logged on {0}", DateTime.Now.ToString());
                Rendezvous.GetInstance().PublishInfo("");
                //NATUPnP.GetInstance ().ScanDevices ();
            }
            Console.Read();
        }