code: def _register_socket(self):
          
          _socket = socket.socket(*Socket.protocols[self.connection.proto])
          _socket.settimeout(self.timeout)
  
          # Reconfigure original socket options.
          if self.connection.sockopts:
              for sock_opt in self.connection.sockopts:
                  level, option, value = sock_opt
                  _socket.setsockopt(level, option, value)
  
          _socket.connect(self.connection.connect_to)
          return _socket
docs: Create/Connect socket, apply options