public static ParseAddress ( string ipAddressOrHostname ) : |
||
ipAddressOrHostname | string | |
Résultat |
private void SetupStatsD(IStatsDConfiguration configuration) { IPAddress address = Helpers.ParseAddress(configuration.Address); // Initialize with ip address. IPipe inner = new UdpPipe(address, configuration.Port); this.statsdPipe = new SamplingPipe(inner); }
private void SetupGraphite(IGraphiteConfiguration configuration) { IPAddress address = Helpers.ParseAddress(configuration.Address); if (configuration.Transport == TransportType.Tcp) { // Initialize with ip address. this.graphitePipe = new TcpPipe(address, configuration.Port); } else if (configuration.Transport == TransportType.Udp) { // Initialize with ip address. this.graphitePipe = new UdpPipe(address, configuration.Port); } else { throw new NotImplementedException("Unknown transport type for graphite pipe: " + configuration.Transport); } }