/// <summary>
        ///     Initializes a new instance of the <see cref="HttpServer" /> class.
        /// </summary>
        /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
        public HttpServer(IModuleManager moduleManager)
        {
            _moduleManager = moduleManager;
            BodyDecoder = new CompositeIMessageSerializer();

            _configuration = new ChannelTcpListenerConfiguration(() => new HttpMessageDecoder(BodyDecoder), () => new HttpMessageEncoder());
            _bufferSlicePool = new BufferSlicePool(65535, 100);
            ApplicationInfo = new MemoryItemStorage();
        }
Example #2
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="HttpServer" /> class.
        /// </summary>
        /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
        public HttpServer(IModuleManager moduleManager)
        {
            _moduleManager = moduleManager;
            BodyDecoder    = new CompositeIMessageSerializer();

            _configuration   = new ChannelTcpListenerConfiguration(() => new HttpMessageDecoder(BodyDecoder), () => new HttpMessageEncoder());
            _bufferSlicePool = new BufferSlicePool(65535, 100);
            ApplicationInfo  = new MemoryItemStorage();
        }
        /// <summary>
        ///     Initializes a new instance of the <see cref="HttpServer" /> class.
        /// </summary>
        /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
        /// <param name="configuration">
        ///     You can override the configuration to your likings.
        /// </param>
        /// <exception cref="System.ArgumentNullException">moduleManager/configuration</exception>
        public HttpServer(IModuleManager moduleManager, ChannelTcpListenerConfiguration configuration)
        {
            if (moduleManager == null) throw new ArgumentNullException("moduleManager");
            if (configuration == null) throw new ArgumentNullException("configuration");

            BodyDecoder = new CompositeIMessageSerializer();
            _moduleManager = moduleManager;
            _configuration = configuration;
            _bufferSlicePool = new BufferSlicePool(65535, 100);
            ApplicationInfo = new MemoryItemStorage();
        }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpServer" /> class.
 /// </summary>
 /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
 /// <param name="configuration">You can override the configuration to your likings. We suggest that you using the <see cref="HttpMessageFactory" /> to produce the messages.</param>
 /// <exception cref="System.ArgumentNullException">moduleManager/configuration</exception>
 public HttpServer(IModuleManager moduleManager, MessagingServerConfiguration configuration)
 {
     if (moduleManager == null) throw new ArgumentNullException("moduleManager");
     if (configuration == null) throw new ArgumentNullException("configuration");
     _moduleManager = moduleManager;
     _server = new MessagingServer(this, configuration);
     _bufferSliceStack = new BufferSliceStack(100, 65535);
     ApplicationInfo = new MemoryItemStorage();
     _workerConfiguration = new WorkerConfiguration
         {
             Application = ApplicationInfo,
             BufferSliceStack = _bufferSliceStack,
             ModuleManager = _moduleManager
         };
 }
Example #5
0
        /// <summary>
        ///     Initializes a new instance of the <see cref="HttpServer" /> class.
        /// </summary>
        /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
        /// <param name="configuration">
        ///     You can override the configuration to your likings.
        /// </param>
        /// <exception cref="System.ArgumentNullException">moduleManager/configuration</exception>
        public HttpServer(IModuleManager moduleManager, ChannelTcpListenerConfiguration configuration)
        {
            if (moduleManager == null)
            {
                throw new ArgumentNullException("moduleManager");
            }
            if (configuration == null)
            {
                throw new ArgumentNullException("configuration");
            }

            BodyDecoder      = new CompositeIMessageSerializer();
            _moduleManager   = moduleManager;
            _configuration   = configuration;
            _bufferSlicePool = new BufferSlicePool(65535, 100);
            ApplicationInfo  = new MemoryItemStorage();
        }
Example #6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpServer" /> class.
 /// </summary>
 /// <param name="moduleManager">The modules are used to process the HTTP requests. You need to specify at least one.</param>
 /// <param name="configuration">You can override the configuration to your likings. We suggest that you using the <see cref="HttpMessageFactory" /> to produce the messages.</param>
 /// <exception cref="System.ArgumentNullException">moduleManager/configuration</exception>
 public HttpServer(IModuleManager moduleManager, MessagingServerConfiguration configuration)
 {
     if (moduleManager == null)
     {
         throw new ArgumentNullException("moduleManager");
     }
     if (configuration == null)
     {
         throw new ArgumentNullException("configuration");
     }
     _moduleManager       = moduleManager;
     _server              = new MessagingServer(this, configuration);
     _bufferSliceStack    = new BufferSliceStack(100, 65535);
     ApplicationInfo      = new MemoryItemStorage();
     _workerConfiguration = new WorkerConfiguration
     {
         Application      = ApplicationInfo,
         BufferSliceStack = _bufferSliceStack,
         ModuleManager    = _moduleManager
     };
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpContext" /> class.
 /// </summary>
 public HttpContext()
 {
     RouteData = new MemoryItemStorage();
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="HttpContext" /> class.
 /// </summary>
 public HttpContext()
 {
     RouteData = new MemoryItemStorage();
 }