Globally hook connection class