This folder gives access to the Network Communication Layer used by the mORMot Open Source framework, version 2.
All mormot.net.*.pas units define client/server communication as used by our framework, especially for its REST features, over sockets, HTTP and WebSockets.
Cross-Platform Raw Sockets API Definition
- Socket Process High-Level Encapsulation
- MAC and IP Addresses Support
- TLS / HTTPS Encryption Abstract Layer
- Efficient Multiple Sockets Polling
TSocketStreamSocket Wrapper- Windows IOCP sockets support
TUriparsing/generating URL wrapperTCrtSocketBuffered Socket Read/Write Class- NTP / SNTP Protocol Client
The Low-Level Sockets API, which is complex and inconsistent among OS, is not made public and shouldn't be used in end-user code. This unit encapsultates all Sockets features into a single set of functions, e.g. around the TNetSocket abstract wrapper.
HTTP/HTTPS Abstract Process Classes and Definitions
- Shared HTTP Constants and Functions
- Reusable HTTP State Machine
THttpSocketImplementing HTTP over plain sockets- Abstract Server-Side Types used e.g. for Client-Server Protocol
- HTTP Server Logging/Monitoring Processors
HTTP Client Classes
THttpMultiPartStreamfor multipart/formdata HTTP POSTTHttpClientSocketImplementing HTTP client over plain sockets- Additional Client Protocols Support (e.g. 'file://')
THttpRequestAbstract HTTP client classTWinHttpTWinINetTCurlHTTPclassesTSimpleHttpClientWrapper Class- Cached HTTP Connection to a Remote Server
- Send Email using the
SMTPProtocol DNSResolution Cache formormot.net.sockNewSocket()
HTTP/UDP Server Classes
- Abstract UDP Server
- Custom URI Routing using an efficient Radix Tree
- Shared Server-Side HTTP Process
THttpServerSocket/THttpServerHTTP/1.1 ServerTHttpPeerCacheLocal Peer-to-peer CacheTHttpApiServerHTTP/1.1 Server Over Windowshttp.sysModuleTHttpApiWebSocketServerOver Windowshttp.sysModule
Event-Driven Network Classes and Functions
- Low-Level Non-blocking Connections
- Client or Server Asynchronous Process
THttpAsyncServerEvent-Driven HTTP Server
Used e.g. by both mormot.net.relay and mormot.net.rtsphttp to handle thousands on concurrent streams, with minimal resources, in a cross-platform way.
WebSockets Abstract Processing for Client and Server
- WebSockets Frames Definitions
- WebSockets Protocols Implementation
- WebSockets Asynchronous Frames Parsing
- WebSockets Client and Server Shared Process
TWebSocketProtocolChatSimple Protocol- Socket.IO / Engine.IO Raw Protocols
WebSockets Bidirectional Client
TWebSocketProcessClientProcessing ClassTHttpClientWebSocketsBidirectional REST Client- Socket.IO / Engine.IO Client Protocol over WebSockets
WebSockets Bidirectional Server
TWebSocketProcessServerProcessing ClassTWebSocketServerSocketBidirectional REST Server- Socket.IO / Engine.IO Server Protocol over WebSockets
Asynchronous WebSockets Bidirectional Server
TWebSocketAsyncServerEvent-Driven HTTP/WebSockets ServerTWebSocketAsyncServerRestBidirectional REST Server
Secured Tunneling over WebSockets
- Low-level Shared Definitions
- Low-level WebSockets Relaying Protocols
- Public and Private relay process
It will encapsulate any WebSockets duplex stream over a public server, allowing any remote client to connect to a local server behind a firewall, using a public server (e.g. a simple Linux box) as relay.
A Private Relay client should connect to a Public Relay Server, probably behind a firewall. By definition, only a single Private Relay client instance could connect at the same time to the Public Relay server.
RTSP Stream Tunnelling over HTTP as defined by Apple at https://web.archive.org/web/20090706123224/developer.apple.com/quicktime/icefloe/dispatch028.html
- Low-level HTTP and RTSP Connections
- RTSP over HTTP Tunnelling
Encapsulate a RTSP TCP/IP duplex video stream into two HTTP links, one POST for upgoing commands, and one GET for downloaded video.
TFTP Protocol and Client with RFC 1350/2347/2348/2349/7440 Support
- TFTP Protocol Definitions
Current limitation: no Client code is defined yet - only the raw TFTP protocol.
TFTP Server Processing with RFC 1350/2347/2348/2349/7440 Support
- TFTP Connection Thread and State Machine
TTftpServerThreadServer Class
Current limitation: only RRQ requests are supported/tested yet.
TCP/UDP Port Forwarding and Tunnelling
- Abstract Definitions for Port Forwarding
- Local NAT Client/Server to Tunnel TCP Streams
Automatic Certificate Management Environment (ACME v2) Client
- JWS HTTP-client implementation
- ACME client implementation
- Let's Encrypt - ZeroSSL TLS / HTTPS Encryption Certificates Support
- HTTP-01 Let's Encrypt - ZeroSSL Challenges HTTP Server on port 80
Simple LDAP Protocol Client
- CLDAP Client Functions
- LDIF Data Interchange Format
- LDAP Protocol Definitions
- LDAP Attributes Definitions
- LDAP Response Storage
- Main
TLdapClientClass - Dedicated
TLdapCheckMemberClass - HTTP BASIC Authentication via LDAP or Kerberos
Simple DNS Protocol Client
- Low-Level DNS Protocol Definitions
- High-Level DNS Query
OpenAPI Language-agnostic Interface to HTTP APIs
- OpenAPI Document Wrappers
- FPC/Delphi Pascal Client Code Generation
See https://blog.synopse.info/?post/2024/09/06/Swagger/OpenAPI-Client-Generator-for-Delphi-and-FPC