public TcpIpHostDataJsonSafe(EnsureSpecial getThisHostInfo, bool once) { TcpIpSystemHostInfo info = LocalNet.GetHostInfo(once); this.HostName = info.HostName; this.DomainName = info.DomainName; this.FqdnHostName = info.FqdnHostName; this.IsIPv4Supported = info.IsIPv4Supported; this.IsIPv6Supported = info.IsIPv6Supported; this.IPAddressList = info.IPAddressList.Select(x => x.ToString()).ToArray(); }
static int Net(ConsoleService c, string cmdName, string str) { ConsoleParam[] args = { }; ConsoleParamValueList vl = c.ParseCommandList(cmdName, str, args); TcpIpSystemHostInfo hostInfo = LocalNet.GetHostInfo(true); Net_Test1_PlainTcp_Client(); return(0); //Net_Test2_Ssl_Client(); //return 0; //Net_Test3_PlainTcp_Server(); //return 0; //Net_Test3_2_PlainTcp_Server_AcceptQueue(); //return 0; //while (true) //{ // try // { // Net_Test4_SpeedTest_Client(); // } // catch (Exception ex) // { // ex.ToString()._Print(); // } //} //Net_Test5_SpeedTest_Server(); //Net_Test6_DualStack_Client(); //Net_Test7_Http_Download_Async()._GetResult(); //Net_Test8_Http_Upload_Async()._GetResult(); //Net_Test9_WebServer(); //Net_Test10_SslServer(); //Net_Test11_AcceptLoop(); //Net_Test12_AcceptLoop2(); //Net_Test13_WebSocketClientAsync()._GetResult(); //Net_Test14_WebSocketClient2Async()._GetResult(); return(0); }