Skip to content

Commit

Permalink
gh-124761: add socket.SO_REUSEPORT_LB (#124961)
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Dec 26, 2024
1 parent 42f7a00 commit 9ddc388
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Doc/library/socket.rst
Original file line number Diff line number Diff line change
Expand Up @@ -674,6 +674,14 @@ Constants

.. availability:: Linux >= 3.9

.. data:: SO_REUSEPORT_LB

Constant to enable duplicate address and port bindings with load balancing.

.. versionadded:: next

.. availability:: FreeBSD >= 12.0

.. data:: AF_HYPERV
HV_PROTOCOL_RAW
HVSOCKET_CONNECT_TIMEOUT
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add :data:`~socket.SO_REUSEPORT_LB` constant to :mod:`socket` for FreeBSD.
3 changes: 3 additions & 0 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -7916,6 +7916,9 @@ socket_exec(PyObject *m)
ADD_INT_MACRO(m, SO_REUSEPORT);
#endif
#endif
#ifdef SO_REUSEPORT_LB
ADD_INT_MACRO(m, SO_REUSEPORT_LB);
#endif
#ifdef SO_SNDBUF
ADD_INT_MACRO(m, SO_SNDBUF);
#endif
Expand Down

0 comments on commit 9ddc388

Please sign in to comment.