/// <summary>
        ///     Create a new channel
        /// </summary>
        /// <param name="readBuffer">Buffer which should be used when reading from the socket</param>
        /// <param name="encoder">Used to encode outgoing data</param>
        /// <param name="decoder">Used to decode incoming data</param>
        /// <returns>Created channel</returns>
        public ITcpChannel Create(IBufferSlice readBuffer, IMessageEncoder encoder, IMessageDecoder decoder) {
            var channel = new SecureTcpChannel(readBuffer, encoder, decoder, _sslStreamBuilder);
            if (OutboundMessageQueueFactory != null)
                channel.OutboundMessageQueue = OutboundMessageQueueFactory();

            return channel;
        }
示例#2
0
        /// <summary>
        ///     Create a new channel
        /// </summary>
        /// <param name="readBuffer">Buffer which should be used when reading from the socket</param>
        /// <param name="encoder">Used to encode outgoing data</param>
        /// <param name="decoder">Used to decode incoming data</param>
        /// <returns>Created channel</returns>
        public ITcpChannel Create(IBufferSlice readBuffer, IMessageEncoder encoder, IMessageDecoder decoder)
        {
            var channel = new SecureTcpChannel(readBuffer, encoder, decoder, _sslStreamBuilder);

            if (OutboundMessageQueueFactory != null)
            {
                channel.OutboundMessageQueue = OutboundMessageQueueFactory();
            }

            return(channel);
        }