Stumbled across a cross platform (Windows/Mac/Linux/Free BSD) socket library with some Lazarus sample codes.
https://github.com/winddriver/Delphi-Cross-SocketThe writing is in Chinese but there are some Client / Server Lazarus examples in the zip file:
Delphi-Cross-Socket-master\Net\Demos\FPCIPv4 and IPv6 are supported at the same time.Supports FPC 3.3.1
Supports OpenSSL 3.x
Added HTTP client ICrossHttpClient (Supports sending data compressed with gzip/deflate)
Added WebSocket client ICrossWebSocket
ICrossSocket
ICrossSslSocket
ICrossServer
ICrossSslServer
The HTTP server supports receiving gzip/deflate compressed data
Supports extremely high concurrency
WindowsCan run more than 100000 concurrent number, need to modify the registry to adjust the default maximum port number
MacThe test environment was OSX 10.9.5 in the virtual machine. even if the limit on the number of handles in the system was modified, can only open more than 32000 concurrent connections at most, perhaps OSX Server version can support higher concurrency
Might be useful for members developing networked apps with ssl