Beispiel #1
0
        public Property HeliosTransport_should_map_valid_IPEndpoints_to_Address(IPEndPoint endpoint)
        {
            var addr     = DotNettyTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo");
            var parsedEp = (IPEndPoint)DotNettyTransport.AddressToSocketAddress(addr);

            return(endpoint.Equals(parsedEp).Label("Should be able to parse endpoint to address and back"));
        }
Beispiel #2
0
        public Property DotNettyTransport_should_map_valid_IPEndpoints_to_Address_when_using_publicport(IPEndPoint endpoint)
        {
            var addr             = DotNettyTransport.MapSocketToAddress(endpoint, "akka.tcp", "foo", publicPort: 1234);
            var parsedEp         = (IPEndPoint)DotNettyTransport.AddressToSocketAddress(addr);
            var expectedEndpoint = new IPEndPoint(endpoint.Address, 1234);

            return(expectedEndpoint.Equals(parsedEp).Label("Should be able to parse endpoint with publicport"));
        }