private Http2ServerUpgradeCodec(string handlerName, Http2ConnectionHandler connectionHandler, params IChannelHandler[] handlers)
 {
     _handlerName       = handlerName;
     _connectionHandler = connectionHandler;
     _handlers          = handlers;
     _frameReader       = new DefaultHttp2FrameReader();
 }
Beispiel #2
0
        private Http2ClientUpgradeCodec(string handlerName, Http2ConnectionHandler connectionHandler,
                                        IChannelHandler upgradeToHandler, Http2MultiplexHandler http2MultiplexHandler)
        {
            if (connectionHandler is null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.connectionHandler);
            }
            if (upgradeToHandler is null)
            {
                ThrowHelper.ThrowArgumentNullException(ExceptionArgument.upgradeToHandler);
            }

            _handlerName           = handlerName;
            _connectionHandler     = connectionHandler;
            _upgradeToHandler      = upgradeToHandler;
            _http2MultiplexHandler = http2MultiplexHandler;
        }
 /// <summary>
 /// Creates the codec providing an upgrade to the given handler for HTTP/2.
 /// </summary>
 /// <param name="handlerName">the name of the HTTP/2 connection handler to be used in the pipeline,
 /// or <c>null</c> to auto-generate the name.</param>
 /// <param name="connectionHandler">the HTTP/2 connection handler</param>
 public Http2ServerUpgradeCodec(string handlerName, Http2ConnectionHandler connectionHandler)
     : this(handlerName, connectionHandler, EMPTY_HANDLERS)
 {
 }
 /// <summary>
 /// Creates the codec using a default name for the connection handler when adding to the pipeline.
 /// </summary>
 /// <param name="connectionHandler">the HTTP/2 connection handler</param>
 public Http2ServerUpgradeCodec(Http2ConnectionHandler connectionHandler)
     : this(null, connectionHandler, EMPTY_HANDLERS)
 {
 }
Beispiel #5
0
 /// <summary>
 /// Creates the codec providing an upgrade to the given handler for HTTP/2.
 /// </summary>
 /// <param name="handlerName">the name of the HTTP/2 connection handler to be used in the pipeline,
 /// or <c>null</c> to auto-generate the name</param>
 /// <param name="connectionHandler">the HTTP/2 connection handler</param>
 /// <param name="http2MultiplexHandler"></param>
 public Http2ClientUpgradeCodec(string handlerName, Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
     : this(handlerName, connectionHandler, connectionHandler, http2MultiplexHandler)
 {
 }
Beispiel #6
0
 /// <summary>
 /// Creates the codec providing an upgrade to the given handler for HTTP/2.
 /// </summary>
 /// <param name="handlerName">the name of the HTTP/2 connection handler to be used in the pipeline,
 /// or <c>null</c> to auto-generate the name</param>
 /// <param name="connectionHandler">the HTTP/2 connection handler</param>
 public Http2ClientUpgradeCodec(string handlerName, Http2ConnectionHandler connectionHandler)
     : this(handlerName, connectionHandler, connectionHandler, null)
 {
 }
Beispiel #7
0
 public Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler, Http2MultiplexHandler http2MultiplexHandler)
     : this((string)null, connectionHandler, http2MultiplexHandler)
 {
 }
Beispiel #8
0
 /// <summary>
 /// Creates the codec using a default name for the connection handler when adding to the pipeline.
 /// </summary>
 /// <param name="connectionHandler">the HTTP/2 connection handler</param>
 public Http2ClientUpgradeCodec(Http2ConnectionHandler connectionHandler)
     : this(null, connectionHandler)
 {
 }