On Tue, 19 May 2020, Giuliano Colla wrote:

Il 19/05/2020 18:57, Michael Van Canneyt ha scritto:

They are not missing.

How do you think fpsock and lnet implement non-blocking ?
It's simply called  O_NONBLOCK.

I'm using fpc 3.0.4. With just Sockets in the uses clause both SOCK_NONBLOCK and O_NONBLOCK give an Identifier not found error. I've seen that SO_REUSEPORT was commented out, so I just defined it in my code.

You'll need the unix/baseunix unit for O_NONBLOCK.

I believe on windows there is a similar define, but I'm not sure where.
It must exist, because the non-blocking works cross-platform.

Michaem.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to