Ejemplo n.º 1
0
        protected volatile bool terminated;                 // necessary to stop the thread


        /// <summary>
        /// Initializes a new instance of the class.
        /// </summary>
        public TcpServerChannel(ILineContext lineContext, ChannelConfig channelConfig)
            : base(lineContext, channelConfig)
        {
            options     = new TcpServerChannelOptions(channelConfig.CustomOptions);
            requestArgs = new IncomingRequestArgs();
            inBuf       = new byte[InBufferLenght];
            connList    = new List <TcpConnection>();

            tcpListener = null;
            currentConn = null;
            deviceDict  = null;
            thread      = null;
            terminated  = false;
        }
 /// <summary>
 /// Initializes a new instance of the class.
 /// </summary>
 public FrmTcpServerChannelOptions(ChannelConfig channelConfig)
     : this()
 {
     this.channelConfig = channelConfig ?? throw new ArgumentNullException(nameof(channelConfig));
     options            = new TcpServerChannelOptions(channelConfig.CustomOptions);
 }