For my VPN app for macOS, implemented with Packet Tunnel Provider, I'm using BSD sockets, over UDP, and they are non-blocking.
If I'm trying to send large files (~1GB), I'm getting the error ENOBUFS (No buffer space available).
I've tried setting SO_SNDBUF, but it didn't help.
In addition, I saw this very old discussion about this problem at macOS - https://lists.freebsd.org/pipermail/freebsd-hackers/2004-January/005369.html
Is there anything I can do to solve it? At the moment I can't send big files via my app.