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

fixes #863 socket activation: for TCP and IPC (POSIX only) #2033

Merged
merged 5 commits into from
Dec 30, 2024

Conversation

gdamore
Copy link
Contributor

@gdamore gdamore commented Dec 30, 2024

This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS, and (on POSIX systems) IPC. This option is used to pass a file descriptor or handle (Windows) that is already listening (ready for ACCEPT to be called).

For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC it must be of type AF_UNIX.

fixes #

Note that the above format should be used in your git commit comments.
You agree that by submitting a PR, you have read and agreed to our
contributing guidelines.

Copy link

codecov bot commented Dec 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.68%. Comparing base (60c9c1c) to head (a74d853).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2033      +/-   ##
==========================================
+ Coverage   82.61%   82.68%   +0.06%     
==========================================
  Files          95       95              
  Lines       23650    23709      +59     
  Branches     3040     3050      +10     
==========================================
+ Hits        19539    19604      +65     
+ Misses       4040     4034       -6     
  Partials       71       71              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

This introduces a new option "NNG_OPT_LISTEN_FD", understood by TCP, TLS,
and (on POSIX systems) IPC.  This option is used to pass a file descriptor
or handle (Windows) that is already listening (ready for ACCEPT to be called).

For TCP and TLS, the socket must be of type AF_INET or AF_INET6, and for IPC
it must be of type AF_UNIX.
This was observed only in the select poller, but the behavior of having
the same file descriptor registered in the poller more than once is undefined.
@gdamore gdamore merged commit a74d853 into main Dec 30, 2024
37 checks passed
@gdamore gdamore deleted the socket-activation branch December 30, 2024 23:06
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