mormot2 TRestHttpServer
mormot2 TRestHttpServer
TRestHttpServer = class(TSynPersistentLock)
/// HTTP/1.1 RESTFUL JSON mORMot Server class
// - this server is multi-threaded and not blocking
// - under Windows, it will first try to use fastest http.sys kernel-mode
// server (i.e. create a THttpApiServer instance); it should work OK under XP
// or WS 2K3 - but you need to have administrator rights under Vista or Seven:
// if http.sys fails to initialize, it will use the socket-based THttpServer;
// a solution is to call the THttpApiServer.AddUrlAuthorize class method during
// program setup for the desired port, or define a useHttpApiRegisteringURI
// kind of server, in order to allow it for every user
// - under Linux, only THttpServer is available
// - you can specify useBidirSocket kind of server (i.e. TWebSocketServerRest)
// if you want the HTTP protocol connection to be upgraded to a WebSockets
// mode, to allow immediate callbacks from the server to the client
// - just create it and it will serve SQL statements as UTF-8 JSON
// - for a true AJAX server, expanded data is prefered - your code may contain:
// ! DBServer.NoAjaxJson := false;
/// HTTP/1.1 RESTFUL JSON mORMot服务器类
// -这个服务器是多线程的,不阻塞
// -在Windows下,它将首先尝试使用最快的http.sys系统内核模式
//创建一个THttpApiServer实例在XP下应该可以工作
//或WS 2K3 -但你需要在Vista或7下有管理员权限:
/ /如果http.sys初始化失败,它将使用基于套接字的THttpServer;
//一个解决方案是调用THttpApiServer。AddUrlAuthorize期间的类方法
//程序设置所需的端口,或定义一个useHttpApiRegisteringURI
//类型的服务器,以便允许它为每个用户
// - Linux下,只有THttpServer可用
// -你可以指定使用bidirsocket类型的服务器(即TWebSocketServerRest)
//如果你想要HTTP协议连接升级到一个WebSockets
//模式,允许从服务器立即回调到客户端
// -只需创建它,它将作为UTF-8 JSON提供SQL语句
// -对于一个真正的AJAX服务器,扩展数据是首选-你的代码可能包含:
/ / !DBServer。NoAjaxJson: = false;
本文来自博客园,作者:{咏南中间件},转载请注明原文链接:https://www.cnblogs.com/hnxxcxg/p/15013781.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-07-15 unigui web app之title buttons
2017-07-15 unigui web app之菜单
2013-07-15 delphi新语法之泛型实现的对象池模板