Allow the handler to provide the create_socket_pair function