Ejemplo n.º 1
0
        private async Task Send()
        {
            var localIp         = IpAddressExtensions.GetLocalIp(HostNameType.Ipv4);
            var broadastAddress = IpAddressExtensions.GetBroadastAddress(localIp);

            IOutputStream outputStream = await listenerSocket.GetOutputStreamAsync(new HostName(broadastAddress.ToString()), "49880");

            using (DataWriter writer = new DataWriter(outputStream))
            {
                writer.WriteString("SEARCH HCGW");
                await writer.StoreAsync();
            }
        }
        public void FirstNullAddressShouldNotBeEqual()
        {
            bool equal = IpAddressExtensions.EqualsAddress(null, IPAddress.Parse("127.0.0.1"));

            Assert.False(equal);
        }