Exemplo n.º 1
0
 public TcpChannel(TcpEndpointData endpointData,
                   IMessageSerializer serializer,
                   ChannelSettings channelSettings,
                   TcpConnectionSettings connetcionSettings,
                   ISecurityWrapper clientSecurityWrapper)
     : base(endpointData, serializer, channelSettings, connetcionSettings, clientSecurityWrapper)
 {
 }
Exemplo n.º 2
0
 public TcpChannel(TcpEndpointData endpointData,
                   IMessageSerializer serializer,
                   ChannelSettings channelSettings,
                   TcpConnectionSettings connetcionSettings,
                   ISecurityWrapper securityWrapper)
     : this(endpointData, serializer, channelSettings, connetcionSettings)
 {
     SecurityWrapper = securityWrapper;
 }
Exemplo n.º 3
0
        private TcpChannel(TcpEndpointData endpointData,
                           IMessageSerializer serializer,
                           ChannelSettings channelSettings,
                           TcpConnectionSettings connetcionSettings)
            : this(endpointData, serializer)
        {
            connetcionSettings.SetupClient(_client);

            MaxMessageLength = channelSettings.MaxMessageLength;
        }
Exemplo n.º 4
0
 public TcpChannelAwaiter(TcpEndpointData endpointData,
                          IMessageSerializer serializer,
                          ChannelSettings channelSettings          = null,
                          TcpConnectionSettings connectionSettings = null,
                          ISecurityWrapper serverSecurityWrapper   = null)
     : base(endpointData,
            serializer,
            channelSettings,
            connectionSettings,
            serverSecurityWrapper)
 {
 }
Exemplo n.º 5
0
        public TcpChannel(TcpEndpointData endpointData, IMessageSerializer serializer)
        {
            Enforce.NotNull(endpointData, nameof(endpointData));
            Enforce.NotNull(serializer, nameof(serializer));

            _endpointData = endpointData;
            Serializer    = serializer;
            _client       = new TcpClient(endpointData.Address.AddressFamily)
            {
                NoDelay = true
            };

            MaxMessageLength = ChannelSettings.GetDefault().MaxMessageLength;
        }
Exemplo n.º 6
0
        public TcpChannelAwaiter(TcpEndpointData endpointData,
                                 IMessageSerializer serializer,
                                 ChannelSettings channelSettings          = null,
                                 TcpConnectionSettings connectionSettings = null,
                                 ISecurityWrapper serverSecurityWrapper   = null)
        {
            Enforce.NotNull(endpointData, nameof(endpointData));
            Enforce.NotNull(serializer, nameof(serializer));

            ListeningData                 = endpointData;
            _serializer                   = serializer;
            ChannelSettings               = channelSettings;
            ConnectionSettings            = connectionSettings;
            ServerSecurityWrapper         = serverSecurityWrapper;
            _listener                     = new TcpListenerEx(endpointData.Address, endpointData.Port);
            _listener.ExclusiveAddressUse = true;
        }
Exemplo n.º 7
0
        internal TcpChannel(TcpClient client,
                            IMessageSerializer serializer,
                            ChannelSettings channelSettings,
                            TcpConnectionSettings connetcionSettings,
                            ISecurityWrapper serverSecurityWrapper)
        {
            Enforce.NotNull(client, nameof(client));
            Enforce.NotNull(serializer, nameof(serializer));

            var ipEndPoint = (IPEndPoint)client.Client.RemoteEndPoint;

            _endpointData   = new TcpEndpointData(ipEndPoint.Address, ipEndPoint.Port);
            Serializer      = serializer;
            _client         = client;
            _client.NoDelay = true;

            connetcionSettings.SetupClient(_client);
            MaxMessageLength = channelSettings.MaxMessageLength;

            SecurityWrapper = serverSecurityWrapper;

            ResponseHandshake();
        }
Exemplo n.º 8
0
 public TcpChannel(TcpEndpointData endpointData, IMessageSerializer serializer)
     : base(endpointData, serializer)
 {
 }