zoukankan      html  css  js  c++  java
  • mormot.net.server.pas

    mormot.net.server.pas

    /// HTTP server using fast http.sys kernel-mode server
    // - The HTTP Server API enables applications to communicate over HTTP without
    // using Microsoft Internet Information Server (IIS). Applications can register
    // to receive HTTP requests for particular URLs, receive HTTP requests, and send
    // HTTP responses. The HTTP Server API includes SSL support so that applications
    // can exchange data over secure HTTP connections without IIS. It is also
    // designed to work with I/O completion ports.
    // - The HTTP Server API is supported on Windows Server 2003 operating systems
    // and on Windows XP with Service Pack 2 (SP2). Be aware that Microsoft IIS 5
    // running on Windows XP with SP2 is not able to share port 80 with other HTTP
    // applications running simultaneously.
    THttpApiServer = class(THttpServerGeneric)

    /// HTTP & WebSocket server using fast http.sys kernel-mode server
    // - can be used like simple THttpApiServer
    // - when AddUrlWebSocket is called WebSocket support are added
    // in this case WebSocket will receiving the frames in asynchronous

    //需要win8,win2012及以上版本才支持
    THttpApiWebSocketServer = class(THttpApiServer)

    上面的2个类,都是针对WINDOWS http.sys的,因此不能用于LINUX。

    /// main HTTP server Thread using the standard Sockets API (e.g. WinSock)
    // - bind to a port and listen to incoming requests
    // - assign this requests to THttpServerResp threads from a ThreadPool
    // - it implements a HTTP/1.1 compatible server, according to RFC 2068 specifications
    // - if the client is also HTTP/1.1 compatible, KeepAlive connection is handled:
    // multiple requests will use the existing connection and thread;
    // this is faster and uses less resources, especialy under Windows
    // - a Thread Pool is used internaly to speed up HTTP/1.0 connections - a
    // typical use, under Linux, is to run this class behind a NGINX frontend,
    // configured as https reverse proxy, leaving default "proxy_http_version 1.0"
    // and "proxy_request_buffering on" options for best performance, and
    // setting KeepAliveTimeOut=0 in the THttpServer.Create constructor
    // - under windows, will trigger the firewall UAC popup at first run
    // - don't forget to use Free method when you are finished
    THttpServer = class(THttpServerGeneric)

    这个类支持WINDOWS AND LINUX。

  • 相关阅读:
    data* H5新特性
    网页系统暗色模式的 W3C 新规范:preferscolorscheme
    pc网页布局简单整理
    [导入] 精彩网站新世界
    单一职责原则SRP(SingleResponsibility Principle)
    WebEx 创始人朱敏做企业家的七个理论(非常实用)
    最近找了些在Win32环境下调用ASP.NET编写的Web Service的例子。
    从SQL Server中读写大数据列。
    开放-封闭原则OCP(OpenClose Principle)
    一个求连数的小测试程序
  • 原文地址:https://www.cnblogs.com/hnxxcxg/p/14040255.html
Copyright © 2011-2022 走看看