Skip to content

Refactor setting socket options #2053

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

Merged
merged 1 commit into from
Feb 15, 2025

Conversation

falbrechtskirchinger
Copy link
Contributor

Add detail::set_socket_opt() and detail::set_socket_opt_time() to avoid repetition of platform-specific code.

Add detail::set_socket_opt() and detail::set_socket_opt_time() to avoid
repetition of platform-specific code.
@falbrechtskirchinger
Copy link
Contributor Author

@yhirose MaxTimeoutTest still times out on MacOS occasionally. Why not call SSL_set_shutdown() with SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN and close the socket, when the timeout has been exceeded, instead of properly shutting down via SSL_shutdown()?

@yhirose
Copy link
Owner

yhirose commented Feb 15, 2025

@yhirose MaxTimeoutTest still times out on MacOS occasionally. Why not call SSL_set_shutdown() with SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN and close the socket, when the timeout has been exceeded, instead of properly shutting down via SSL_shutdown()?

Could you please send another pull request for this?

@yhirose yhirose merged commit 233f0fb into yhirose:master Feb 15, 2025
4 checks passed
@yhirose
Copy link
Owner

yhirose commented Feb 15, 2025

@falbrechtskirchinger thanks for the excellent improvement!

@falbrechtskirchinger falbrechtskirchinger deleted the socketopt branch February 15, 2025 04:50
@falbrechtskirchinger
Copy link
Contributor Author

@yhirose MaxTimeoutTest still times out on MacOS occasionally. Why not call SSL_set_shutdown() with SSL_SENT_SHUTDOWN | SSL_RECEIVED_SHUTDOWN and close the socket, when the timeout has been exceeded, instead of properly shutting down via SSL_shutdown()?

Could you please send another pull request for this?

After studying the man pages of the relevant calls, I rewrote ssl_delete, but it's still struggling on MacOS. I may try again tomorrow; I have another idea similar to what's being done in ssl_connect_or_accept_nonblocking().

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.

2 participants