public void Send(GelfMessage message) { using (var udpClient = new UdpClient()) foreach (var bytes in encoder.Encode(messageSerializer.Serialize(message))) { var result = udpClient.SendAsync(bytes, bytes.Length, configuration.Host).Result; } }
public void Send(GelfMessage message) { using (var udpClient = new UdpClient()) foreach (var bytes in encoder.Encode(messageSerializer.Serialize(message))) { udpClient.Send(bytes, bytes.Length, configuration.GetHost()); } }
public void Send(GelfMessage message) { EstablishConnection(); var serialzed = messageSerializer.Serialize(message); var encoded = encoder.Encode(serialzed); foreach (var bytes in encoded) { udpClient.Send(bytes, bytes.Length); } }
public void Send(GelfMessage message) { EstablishConnection(); foreach (var bytes in encoder.Encode(messageSerializer.Serialize(message))) { var basicProperties = new BasicProperties { DeliveryMode = configuration.Persistent ? (byte)2 : (byte)1 }; channel.BasicPublish(configuration.Exchange, configuration.RoutingKey, false, false, basicProperties, bytes); } }