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

Function _have_socket_alg

Lib/test/test_socket.py:147–155  ·  view source on GitHub ↗

Check whether AF_ALG sockets are supported on this host.

()

Source from the content-addressed store, hash-verified

145 return True
146
147def _have_socket_alg():
148 """Check whether AF_ALG sockets are supported on this host."""
149 try:
150 s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
151 except (AttributeError, OSError):
152 return False
153 else:
154 s.close()
155 return True
156
157def _have_socket_qipcrtr():
158 """Check whether AF_QIPCRTR sockets are supported on this host."""

Callers 1

test_socket.pyFile · 0.85

Calls 2

socketMethod · 0.80
closeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…