public TcpTransport(TcpTransportConfiguration configuration, Identity identity, RoutingTable routingTable, PeerTable peerTable, InboundMessageDispatcher inboundMessageDispatcher, TcpRoutingContextContainer tcpRoutingContextContainer, PayloadUtils payloadUtils) {
    this.configuration = configuration;
    this.identity = identity;
    this.routingTable = routingTable;
    this.peerTable = peerTable;
    this.inboundMessageDispatcher = inboundMessageDispatcher;
    this.tcpRoutingContextContainer = tcpRoutingContextContainer;
    this.payloadUtils = payloadUtils;
 }
Beispiel #2
0
        public GelfTcpTarget()
        {
            TcpTransportConfiguration defaultCfg = TcpTransportConfiguration.GetDefaultConfiguration();

            RemoteAddress = defaultCfg.RemoteAddress;
            RemotePort    = defaultCfg.RemotePort;
            Ssl           = defaultCfg.Ssl;
            Timeout       = defaultCfg.Timeout;
        }
Beispiel #3
0
        protected override ITransport InitializeTransport(IEasyGelfLogger logger)
        {
            var configuration = new TcpTransportConfiguration
            {
                RemoteAddress = RemoteAddress,
                RemotePort    = RemotePort,
            };

            return(new TcpTransport(configuration, new GelfMessageSerializer()));
        }
Beispiel #4
0
        public GelfTcpAppender()
        {
            TcpTransportConfiguration defaultCfg = TcpTransportConfiguration.GetDefaultConfiguration();

            CertificatePath = defaultCfg.CertificatePath;
            RemoteAddress   = defaultCfg.RemoteAddress;
            RemotePort      = defaultCfg.RemotePort;
            Ssl             = defaultCfg.Ssl;
            Timeout         = defaultCfg.Timeout;
        }
 public TcpTransport(TcpTransportConfiguration configuration, Identity identity, RoutingTable routingTable, PeerTable peerTable, InboundMessageDispatcher inboundMessageDispatcher, TcpRoutingContextContainer tcpRoutingContextContainer, PayloadUtils payloadUtils)
 {
     this.configuration              = configuration;
     this.identity                   = identity;
     this.routingTable               = routingTable;
     this.peerTable                  = peerTable;
     this.inboundMessageDispatcher   = inboundMessageDispatcher;
     this.tcpRoutingContextContainer = tcpRoutingContextContainer;
     this.payloadUtils               = payloadUtils;
 }
Beispiel #6
0
        protected override ITransport InitializeTransport(IEasyGelfLogger logger)
        {
            var configuration = new TcpTransportConfiguration
            {
                RemoteAddress = RemoteAddress,
                RemotePort    = RemotePort,
                Ssl           = Ssl,
                Timeout       = Timeout
            };

            return(TcpTransportFactory.Produce(configuration));
        }
Beispiel #7
0
        protected override ITransport InitializeTransport(IEasyGelfLogger logger)
        {
            var removeIpAddress = Dns.GetHostAddressesAsync(RemoteAddress).Result
                                  .Shuffle()
                                  .FirstOrDefault() ?? IPAddress.Loopback;
            var configuration = new TcpTransportConfiguration
            {
                Host = new IPEndPoint(removeIpAddress, RemotePort),
            };

            return(new TcpTransport(configuration, new GelfMessageSerializer()));
        }
 public TcpRoutingContext(TcpTransportConfiguration configuration, TcpRoutingContextContainer tcpRoutingContextContainer, Socket client, InboundMessageDispatcher inboundMessageDispatcher, Identity localIdentity, RoutingTable routingTable, PeerTable peerTable, PayloadUtils payloadUtils) {
    logger.Debug($"Constructing TcpRoutingContext for client {client.RemoteEndPoint}, localId: {localIdentity}");
    
    this.configuration = configuration;
    this.tcpRoutingContextContainer = tcpRoutingContextContainer;
    this.client = client;
    this.inboundMessageDispatcher = inboundMessageDispatcher;
    this.localIdentity = localIdentity;
    this.routingTable = routingTable;
    this.peerTable = peerTable;
    this.payloadUtils = payloadUtils;
    this.ns = new NetworkStream(client);
 }
Beispiel #9
0
        public TcpRoutingContext(TcpTransportConfiguration configuration, TcpRoutingContextContainer tcpRoutingContextContainer, Socket client, InboundMessageDispatcher inboundMessageDispatcher, Identity localIdentity, RoutingTable routingTable, PeerTable peerTable, PayloadUtils payloadUtils)
        {
            logger.Debug($"Constructing TcpRoutingContext for client {client.RemoteEndPoint}, localId: {localIdentity}");

            this.configuration = configuration;
            this.tcpRoutingContextContainer = tcpRoutingContextContainer;
            this.client = client;
            this.inboundMessageDispatcher = inboundMessageDispatcher;
            this.localIdentity            = localIdentity;
            this.routingTable             = routingTable;
            this.peerTable    = peerTable;
            this.payloadUtils = payloadUtils;
            this.ns           = new NetworkStream(client);
        }