Use the '_socket' module. This is our implementation of '_socket', the Python builtin module exposing socket primitives, which is wrapped and used by the standard library 'socket.py' module. It is based on `rffi`_. .. _`rffi`: ../rffi.html