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。
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/14040255.html
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 三行代码完成国际化适配,妙~啊~
· .NET Core 中如何实现缓存的预热?
2017-11-26 超市收银系统
2014-11-26 连锁快餐管理系统