Recent

Author Topic: Delphi cross platform socket library with Lazarus Examples  (Read 1314 times)

Boleeman

  • Hero Member
  • *****
  • Posts: 1111
Delphi cross platform socket library with Lazarus Examples
« on: March 10, 2025, 03:56:48 am »
Stumbled across a cross platform (Windows/Mac/Linux/Free BSD) socket library with some Lazarus sample codes.

https://github.com/winddriver/Delphi-Cross-Socket

The writing is in Chinese but there are some Client / Server Lazarus examples in the zip file:
Delphi-Cross-Socket-master\Net\Demos\FPC

IPv4 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

Windows
Can run more than 100000 concurrent number, need to modify the registry to adjust the default maximum port number

Mac
The 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
« Last Edit: March 10, 2025, 04:05:38 am by Boleeman »

BlueIcaro

  • Hero Member
  • *****
  • Posts: 833
    • Blog personal
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #1 on: March 10, 2025, 05:25:31 pm »
Hello, this library uses Anonymous, so needs Fpc 3.3.1.
am I wrong?

/BlueIcaro

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #2 on: March 10, 2025, 05:47:17 pm »
Correct, needs trunk.

But why would you use it?
The standard sockets in the fpc rtl and standard package fcl-net are already cross platform and for a lot more platforms.
Trunk also supports IPv6/IPv4 at the same time, maybe even 3.2.2.

Can't find a killer feature.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

BlueIcaro

  • Hero Member
  • *****
  • Posts: 833
    • Blog personal
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #3 on: March 10, 2025, 05:48:22 pm »
Correct, needs trunk.

But why would you use it?
The standard sockets in the fpc rtl and standard package fcl-net are already cross platform and for a lot more platforms.
Trunk also supports IPv6/IPv4 at the same time, maybe even 3.2.2.

Can't find a killer feature.

The standard sockets supports websocket client with ssl?

/BlueIcaro

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #4 on: March 10, 2025, 05:59:13 pm »
Yes? What is the problem with the openssl units in fcl-net?  None.
(Apart from stupid recurring dumb questions about versioning)

Ssl support - well ssl as such has been removed, but tls 1.1+ is - is transparent and just needs one unit included. No coding.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

BlueIcaro

  • Hero Member
  • *****
  • Posts: 833
    • Blog personal
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #5 on: March 10, 2025, 06:21:33 pm »
Yes? What is the problem with the openssl units in fcl-net?  None.
(Apart from stupid recurring dumb questions about versioning)

Ssl support - well ssl as such has been removed, but tls 1.1+ is - is transparent and just needs one unit included. No coding.
I know that I can use ssl with fpc 3.2.2. But I'm looking for a implementation (examples, component, etc. in fpc 3.2.2 of websockets https://en.wikipedia.org/wiki/WebSocket using ssl connection.

I'm don't want use 3.3.1 in my proyect, don't ask for reasons!.

Thaddy

  • Hero Member
  • *****
  • Posts: 18729
  • To Europe: simply sell USA bonds: dollar collapses
Re: Delphi cross platform socket library with Lazarus Examples
« Reply #6 on: March 10, 2025, 06:31:32 pm »
In the case of websocket I really lost you because that relies on the browser implementation.
If Europe sells their USA bonds the USD will collapse. Europe can affort that given average state debts. The USA can't affort that. Just an advice...

 

TinyPortal © 2005-2018