Beispiel #1
0
 public UdpTransport(
     UdpTransportConfiguration configuration,
     ITransportEncoder encoder,
     IGelfMessageSerializer messageSerializer)
 {
     this.configuration     = configuration;
     this.encoder           = encoder;
     this.messageSerializer = messageSerializer;
 }
Beispiel #2
0
 protected override ITransport InitializeTransport(IEasyGelfLogger logger)
 {
     var remoteIpAddress = Dns.GetHostAddresses(RemoteAddress)
         .Shuffle()
         .FirstOrDefault() ?? IPAddress.Loopback;
     var encoder = new CompositeEncoder(new GZipEncoder(), new ChunkingEncoder(new MessageBasedIdGenerator(), MessageSize.UdpMessageSize()));
     var configuration = new UdpTransportConfiguration
         {
             Host = new IPEndPoint(remoteIpAddress, RemotePort),
         };
     return new UdpTransport(configuration, encoder, new GelfMessageSerializer());
 }
Beispiel #3
0
 public UdpTransport(UdpTransportConfiguration configuration, ITransportEncoder encoder, IGelfMessageSerializer messageSerializer)
 {
     this.configuration = configuration;
     this.encoder = encoder;
     this.messageSerializer = messageSerializer;
 }