Esempio n. 1
0
 public UdpTransport(
     UdpTransportConfiguration configuration,
     ITransportEncoder encoder,
     IGelfMessageSerializer messageSerializer)
 {
     this.configuration     = configuration;
     this.encoder           = encoder;
     this.messageSerializer = messageSerializer;
 }
Esempio n. 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());
 }
Esempio n. 3
0
 public UdpTransport(UdpTransportConfiguration configuration, ITransportEncoder encoder, IGelfMessageSerializer messageSerializer)
 {
     this.configuration = configuration;
     this.encoder = encoder;
     this.messageSerializer = messageSerializer;
 }