MCPcopy Index your code
hub / github.com/RustPython/RustPython / _have_socket_alg

Function _have_socket_alg

Lib/test/test_socket.py:145–153  ·  view source on GitHub ↗

Check whether AF_ALG sockets are supported on this host.

()

Source from the content-addressed store, hash-verified

143 return True
144
145def _have_socket_alg():
146 """Check whether AF_ALG sockets are supported on this host."""
147 try:
148 s = socket.socket(socket.AF_ALG, socket.SOCK_SEQPACKET, 0)
149 except (AttributeError, OSError):
150 return False
151 else:
152 s.close()
153 return True
154
155def _have_socket_qipcrtr():
156 """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