JustEat.StatsD.StatsDUdpClient.StatsDUdpClient C# (CSharp) Method

StatsDUdpClient() private method

private StatsDUdpClient ( IDnsEndpointMapper endpointMapper, string hostNameOrAddress, int port ) : System
endpointMapper IDnsEndpointMapper
hostNameOrAddress string
port int
return System
        private StatsDUdpClient(IDnsEndpointMapper endpointMapper, string hostNameOrAddress, int port)
        {
            _endPointMapper = endpointMapper;
            _hostNameOrAddress = hostNameOrAddress;
            _port = port;

            //if we were given an IP instead of a hostname, we can happily cache it off for the life of this class
            IPAddress address;
            if (IPAddress.TryParse(hostNameOrAddress, out address))
            {
                _ipBasedEndpoint = new IPEndPoint(address, _port);
            }
        }

Same methods

StatsDUdpClient::StatsDUdpClient ( int endpointCacheDuration, string hostNameOrAddress, int port ) : System
StatsDUdpClient::StatsDUdpClient ( string hostNameOrAddress, int port ) : System