예제 #1
0
 internal UdpServer(IPEndPoint address, int backlog, MemoryAllocator <byte> allocator, Func <int, IExchangePool> exchangePoolFactory, ILoggerFactory loggerFactory)
     : base(address, backlog, allocator, loggerFactory)
 {
     channels            = new INetworkTransport.ChannelPool <Channel>(backlog);
     cancellationHandler = channels.CancellationRequested;
     exchanges           = exchangePoolFactory(backlog);
 }
예제 #2
0
 internal UdpClient(IPEndPoint localEndPoint, IPEndPoint remoteEndPoint, int backlog, MemoryAllocator <byte> allocator, Func <long> appIdGenerator, ILoggerFactory loggerFactory)
     : base(remoteEndPoint, backlog, allocator, loggerFactory)
 {
     channels            = new INetworkTransport.ChannelPool <Channel>(backlog);
     cancellationHandler = channels.CancellationRequested;
     applicationId       = appIdGenerator();
     streamNumber        = long.MinValue;
     this.localEndPoint  = localEndPoint;
 }