public Task<ITransport> CreateAsync(MobOperations mobOperations, Identity identity, RoutingTable routingTable, PeerTable peerTable, InboundMessageDispatcher inboundMessageDispatcher, AuditService auditService) { var inboundBytesAggregator = auditService.GetAggregator<double>(DataSetNames.kInboundBytes); var outboundBytesAggregator = auditService.GetAggregator<double>(DataSetNames.kOutboundBytes); var tcpRoutingContextContainer = new TcpRoutingContextContainer(); var payloadUtils = new PayloadUtils(inboundBytesAggregator, outboundBytesAggregator); var transport = new TcpTransport(configuration, identity, routingTable, peerTable, inboundMessageDispatcher, tcpRoutingContextContainer, payloadUtils); transport.Initialize(); mobOperations.RegisterMob(new TcpDebugMob(tcpRoutingContextContainer)); return Task.FromResult<ITransport>(transport); }
public Task <ITransport> CreateAsync(MobOperations mobOperations, Identity identity, RoutingTable routingTable, PeerTable peerTable, InboundMessageDispatcher inboundMessageDispatcher, AuditService auditService) { var inboundBytesAggregator = auditService.GetAggregator <double>(DataSetNames.kInboundBytes); var outboundBytesAggregator = auditService.GetAggregator <double>(DataSetNames.kOutboundBytes); var tcpRoutingContextContainer = new TcpRoutingContextContainer(); var payloadUtils = new PayloadUtils(inboundBytesAggregator, outboundBytesAggregator); var transport = new TcpTransport(configuration, identity, routingTable, peerTable, inboundMessageDispatcher, tcpRoutingContextContainer, payloadUtils); transport.Initialize(); mobOperations.RegisterMob(new TcpDebugMob(tcpRoutingContextContainer)); return(Task.FromResult <ITransport>(transport)); }