コード例 #1
0
 public TcpChannel(TcpEndpointData endpointData,
                   IMessageSerializer serializer,
                   ChannelSettings channelSettings,
                   TcpConnectionSettings connetcionSettings,
                   ISecurityWrapper clientSecurityWrapper)
     : base(endpointData, serializer, channelSettings, connetcionSettings, clientSecurityWrapper)
 {
 }
コード例 #2
0
ファイル: TcpChannel.cs プロジェクト: lanicon/SharpChannels
 public TcpChannel(TcpEndpointData endpointData,
                   IMessageSerializer serializer,
                   ChannelSettings channelSettings,
                   TcpConnectionSettings connetcionSettings,
                   ISecurityWrapper securityWrapper)
     : this(endpointData, serializer, channelSettings, connetcionSettings)
 {
     SecurityWrapper = securityWrapper;
 }
コード例 #3
0
ファイル: TcpChannel.cs プロジェクト: lanicon/SharpChannels
        private TcpChannel(TcpEndpointData endpointData,
                           IMessageSerializer serializer,
                           ChannelSettings channelSettings,
                           TcpConnectionSettings connetcionSettings)
            : this(endpointData, serializer)
        {
            connetcionSettings.SetupClient(_client);

            MaxMessageLength = channelSettings.MaxMessageLength;
        }
コード例 #4
0
 public TcpChannelAwaiter(TcpEndpointData endpointData,
                          IMessageSerializer serializer,
                          ChannelSettings channelSettings          = null,
                          TcpConnectionSettings connectionSettings = null,
                          ISecurityWrapper serverSecurityWrapper   = null)
     : base(endpointData,
            serializer,
            channelSettings,
            connectionSettings,
            serverSecurityWrapper)
 {
 }
コード例 #5
0
ファイル: TcpChannel.cs プロジェクト: lanicon/SharpChannels
        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;
        }
コード例 #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;
        }
コード例 #7
0
ファイル: TcpChannel.cs プロジェクト: lanicon/SharpChannels
        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();
        }
コード例 #8
0
 public TcpChannel(TcpEndpointData endpointData, IMessageSerializer serializer)
     : base(endpointData, serializer)
 {
 }