/// <inheritdoc />
 private ProxiedTcpServerApplicationBase([NotNull] NetworkAddressInfo serverAddress, [NotNull] NetworkAddressInfo proxyToEndpointAddress, [NotNull] ILog logger, [NotNull] INetworkMessageDispatchingStrategy <TPayloadWriteType, TPayloadReadType> messageHandlingStrategy, [NotNull] PayloadHandlerRegisterationModules <TPayloadReadType, TPayloadWriteType> handlerModulePair, [NotNull] NetworkSerializerServicePair serializers)
     : base(serverAddress, messageHandlingStrategy, logger)
 {
     HandlerModulePair      = handlerModulePair ?? throw new ArgumentNullException(nameof(handlerModulePair));
     Serializers            = serializers ?? throw new ArgumentNullException(nameof(serializers));
     ProxyToEndpointAddress = proxyToEndpointAddress ?? throw new ArgumentNullException(nameof(proxyToEndpointAddress));
     ServiceContainer       = BuildServiceContainer();
 }
Exemplo n.º 2
0
        /// <inheritdoc />
        public SessionDetails(NetworkAddressInfo address, int connectionId)
        {
            if (address == null)
            {
                throw new ArgumentNullException(nameof(address));
            }
            if (connectionId < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(connectionId));
            }

            Address      = address;
            ConnectionId = connectionId;
        }
 /// <inheritdoc />
 protected ProxiedTcpServerApplicationBase(NetworkAddressInfo listenerAddress, [NotNull] NetworkAddressInfo proxyToEndpointAddress, [NotNull] ILog logger, PayloadHandlerRegisterationModules <TPayloadReadType, TPayloadWriteType> handlerModulePair, NetworkSerializerServicePair serializers)
     : this(listenerAddress, proxyToEndpointAddress, logger, new InPlaceAsyncLockedNetworkMessageDispatchingStrategy <TPayloadWriteType, TPayloadReadType>(), handlerModulePair, serializers)
 {
 }