Exemplo n.º 1
0
 public DefaultConnector(IChannelFactory channelFactory, IdleStateMonitor idleStateMonitor, IHandshakeHandler handshakeHandler)
 {
     this.channel          = channelFactory.CreateChannel();
     this.handshakeHandler = handshakeHandler;
     this.idleStateMonitor = idleStateMonitor ?? new IdleStateMonitor(TimeSpan.FromSeconds(30.0));
     this.idleStateMonitor.IdleStateChanged += OnIdleStateChanged;
 }
Exemplo n.º 2
0
 public DefaultConnector(IChannel <IMessage> channel, IdleStateMonitor idleStateMonitor, IHandshakeHandler handshakeHandler)
 {
     this.channel          = channel ?? throw new ArgumentNullException(nameof(channel));
     this.handshakeHandler = handshakeHandler;
     this.idleStateMonitor = idleStateMonitor ?? new IdleStateMonitor(TimeSpan.FromSeconds(30.0));
     this.idleStateMonitor.IdleStateChanged += OnIdleStateChanged;
 }
        public ChannelBase(IMessageDecoder <IMessage> decoder, IMessageEncoder <IMessage> encoder, IHandshakeHandler handshakeHandler)
        {
            this.decoder          = decoder ?? throw new ArgumentNullException("decoder");
            this.encoder          = encoder ?? throw new ArgumentNullException("encoder");
            this.handshakeHandler = handshakeHandler;

            this.ReceiveBufferSize = RECEIVE_BUFFER_SIZE;
            this.SendBufferSize    = SEND_BUFFER_SIZE;
            this.NoDelay           = true;
            this.IsBigEndian       = true;
        }
Exemplo n.º 4
0
        public TcpChannel(AddressFamily family, IMessageDecoder <IMessage> decoder, IMessageEncoder <IMessage> encoder, IHandshakeHandler handshakeHandler) : base(decoder, encoder, handshakeHandler)
        {
            if (family != AddressFamily.InterNetwork && family != AddressFamily.InterNetworkV6)
            {
                throw new ArgumentException("family");
            }

            this.family = family;
            this.adaptiveAddressFamily = false;
        }
Exemplo n.º 5
0
 public TcpChannel(IMessageDecoder <IMessage> decoder, IMessageEncoder <IMessage> encoder, IHandshakeHandler handshakeHandler) : base(decoder, encoder, handshakeHandler)
 {
 }
Exemplo n.º 6
0
        public TcpChannel(AddressFamily family, ICodecFactory <IMessage> codecFactory, IHandshakeHandler handshakeHandler) : base(codecFactory, handshakeHandler)
        {
            if (family != AddressFamily.InterNetwork && family != AddressFamily.InterNetworkV6)
            {
                throw new ArgumentException("family");
            }

            this.family = family;
            this.adaptiveAddressFamily = false;
        }
Exemplo n.º 7
0
 public TcpChannel(ICodecFactory <IMessage> codecFactory, IHandshakeHandler handshakeHandler) : base(codecFactory, handshakeHandler)
 {
 }
 public ChannelBase(ICodecFactory <IMessage> codecFactory, IHandshakeHandler handshakeHandler)
 {
     this.codecFactory     = codecFactory ?? throw new ArgumentNullException("codecFactory");
     this.handshakeHandler = handshakeHandler;
 }
Exemplo n.º 9
0
 public DefaultConnector(IChannelFactory channelFactory, IHandshakeHandler handshakeHandler) : this(channelFactory, null, handshakeHandler)
 {
 }
Exemplo n.º 10
0
 public DefaultConnector(IChannel <IMessage> channel, IHandshakeHandler handshakeHandler) : this(channel, null, handshakeHandler)
 {
 }