zen
zen copied to clipboard
Refactor sockets
This PR stems from Bitcoin PR20788, with the goal of making sockets handling safer and better encapsulated.
All direct accesses to SOCKET fds are now handled in the Sock
class, which ensures that sockets and associated SSL sessions are closed properly on destruction.
Finally, this PR switches Linux syscall to wait on sockets from select()
to poll()
, achieving more flexibility in terms of usable fds, and possibly better performance.