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; }
public GelfTcpTarget() { TcpTransportConfiguration defaultCfg = TcpTransportConfiguration.GetDefaultConfiguration(); RemoteAddress = defaultCfg.RemoteAddress; RemotePort = defaultCfg.RemotePort; Ssl = defaultCfg.Ssl; Timeout = defaultCfg.Timeout; }
protected override ITransport InitializeTransport(IEasyGelfLogger logger) { var configuration = new TcpTransportConfiguration { RemoteAddress = RemoteAddress, RemotePort = RemotePort, }; return(new TcpTransport(configuration, new GelfMessageSerializer())); }
public GelfTcpAppender() { TcpTransportConfiguration defaultCfg = TcpTransportConfiguration.GetDefaultConfiguration(); CertificatePath = defaultCfg.CertificatePath; RemoteAddress = defaultCfg.RemoteAddress; RemotePort = defaultCfg.RemotePort; Ssl = defaultCfg.Ssl; Timeout = defaultCfg.Timeout; }
protected override ITransport InitializeTransport(IEasyGelfLogger logger) { var configuration = new TcpTransportConfiguration { RemoteAddress = RemoteAddress, RemotePort = RemotePort, Ssl = Ssl, Timeout = Timeout }; return(TcpTransportFactory.Produce(configuration)); }
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); }