Ejemplo n.º 1
0
 public TcpTransport(TcpTransportConfiguration configuration,
                     IGelfMessageSerializer messageSerializer,
                     Func <ITcpConnection> createConnection)
 {
     this.configuration     = configuration;
     this.messageSerializer = messageSerializer;
     this.createConnection  = createConnection;
 }
Ejemplo n.º 2
0
		protected override ITransport InitializeTransport(IEasyGelfLogger logger)
		{
			var configuration = new TcpTransportConfiguration
			{
				RemoteAddress = RemoteAddress,
				RemotePort = RemotePort,
			};
			return new TcpTransport(configuration, new GelfMessageSerializer());
		}
Ejemplo n.º 3
0
 protected override ITransport InitializeTransport(IEasyGelfLogger logger)
 {
     var remoteIpAddress = Dns.GetHostAddresses(RemoteAddress)
         .Shuffle()
         .FirstOrDefault() ?? IPAddress.Loopback;
     var configuration = new TcpTransportConfiguration
         {
             Host = new IPEndPoint(remoteIpAddress, RemotePort),
         };
     return new TcpTransport(configuration, new GelfMessageSerializer());
 }
Ejemplo n.º 4
0
 public static ITransport Produce(TcpTransportConfiguration configuration)
 {
     if (configuration.Ssl)
     {
         return(new TcpTransport(configuration, new GelfMessageSerializer(), () => new TcpSslConnection(configuration)));
     }
     else
     {
         return(new TcpTransport(configuration, new GelfMessageSerializer(), () => new TcpConnection(configuration)));
     }
 }
Ejemplo n.º 5
0
 public TcpTransport(TcpTransportConfiguration configuration, IGelfMessageSerializer messageSerializer)
 {
     this.configuration = configuration;
     this.messageSerializer = messageSerializer;
 }
Ejemplo n.º 6
0
        public TcpConnection(TcpTransportConfiguration configuration)
        {
            this.configuration = configuration;

            client = new TcpClient();
        }
Ejemplo n.º 7
0
 public TcpTransport(TcpTransportConfiguration configuration, IGelfMessageSerializer messageSerializer)
 {
     this.configuration     = configuration;
     this.messageSerializer = messageSerializer;
 }
Ejemplo n.º 8
0
 public static ITransport Produce(TcpTransportConfiguration configuration, IEasyGelfLogger logger)
 {
     return(configuration.Ssl
         ? new TcpTransport(configuration, new GelfMessageSerializer(logger), () => new TcpSslConnection(configuration))
         : new TcpTransport(configuration, new GelfMessageSerializer(logger), () => new TcpConnection(configuration)));
 }