NetworkExtensionsTests TestToEndPointWithLoopbackAddress Method Delta Engine Documentation

Namespace: DeltaEngine.Networking.Tests.Tcp
Assembly: DeltaEngine.Networking.Tests (in DeltaEngine.Networking.Tests.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public void TestToEndPointWithLoopbackAddress()
Examples

[Test]
public void TestToEndPointWithLoopbackAddress()
{
    IPEndPoint endpointFromHostname = NetworkExtensions.ToEndPoint("localhost", ServicesPort);
    IPEndPoint endpointFromIp = NetworkExtensions.ToEndPoint("127.0.0.1", ServicesPort);
    string expectedEndpoint = "127.0.0.1:" + ServicesPort;
    Assert.AreEqual(expectedEndpoint, endpointFromHostname.ToString());
    Assert.AreEqual(expectedEndpoint, endpointFromIp.ToString());
}
See Also