Наследование: StatsdClient.Address, IStatsdClient
 public void Sends_a_counter()
 {
     try
     {
         var client = new StatsdUDPClient(_serverName, _serverPort);
         client.Send("socket2:1|c");
     }
     catch(SocketException ex)
     {
         Assert.Fail("Socket Exception, have you setup your Statsd name and port? It's currently '{0}:{1}'. Error: {2}", _serverName, _serverPort, ex.Message);
     }
 }
 public void ipv4_parsing_works_with_ip()
 {
     var statsdUdp = new StatsdUDPClient("127.0.0.1", RandomUnusedLocalPort);
     Assert.That(statsdUdp.IPEndpoint.Address.ToString(), Is.StringContaining("127.0.0.1"));
 }
 public void set_max_udp_packet_size()
 {
     // Make sure that we can set the max UDP packet size
     udp = new StatsdUDPClient(serverName, serverPort, 10);
     statsd = new Statsd(udp);
     var msg = new String('f', 5);
     listenThread.Start(2);
     statsd.Add<Statsd.Counting>(msg, 1);
     statsd.Add<Statsd.Timing>(msg, 2);
     statsd.Send();
     // Since our packet size limit is now 10, this (short) message should still be split
     AssertWasReceived(String.Format("{0}:1|c", msg), 0);
     AssertWasReceived(String.Format("{0}:2|ms", msg), 1);
 }
            public void udp_listener_works()
            {
                var client = new StatsdUDPClient(_localhostAddress, _randomUnusedLocalPort);
                client.Send("iamnotinsane!");

                Assert.That(LastPacketMessageReceived(), Is.EqualTo("iamnotinsane!"));
            }
 public void SetUpUdpListenerAndStatsd()
 {
     udpListener = new UdpListener(serverName, serverPort);
     var metricsConfig = new MetricsConfig { StatsdServerName = serverName };
     StatsdClient.Metrics.Configure(metricsConfig);
     udp = new StatsdUDPClient(serverName, serverPort);
     statsd = new Statsd(udp);
 }