Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor sockets #614

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Refactor sockets #614

wants to merge 4 commits into from

Conversation

drgora
Copy link
Contributor

@drgora drgora commented Oct 3, 2023

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 added 4 commits October 3, 2023 17:31
This commit follows Bitcoin PR20788 (and probably several followups), and introduces a Sock class to handle the
lifetime of network sockets and associated SSL connection handlers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant