Skip to content
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
Loading