Allow to pass opaque pointer when connecting