MCPcopy Index your code
hub / github.com/python/cpython / _set_reuseport

Function _set_reuseport

Lib/asyncio/base_events.py:91–99  ·  view source on GitHub ↗
(sock)

Source from the content-addressed store, hash-verified

89
90
91def _set_reuseport(sock):
92 if not hasattr(socket, 'SO_REUSEPORT'):
93 raise ValueError('reuse_port not supported by socket module')
94 else:
95 try:
96 sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEPORT, 1)
97 except OSError:
98 raise ValueError('reuse_port not supported by socket module, '
99 'SO_REUSEPORT defined but not implemented.')
100
101
102def _ipaddr_info(host, port, family, type, proto, flowinfo=0, scopeid=0):

Callers 2

create_serverMethod · 0.85

Calls 1

setsockoptMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…