zen icon indicating copy to clipboard operation
zen copied to clipboard

Refactor sockets

Open drgora opened this issue 1 year ago • 0 comments

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.

drgora avatar Oct 03 '23 16:10 drgora