wxClient::OnMakeConnection

wxConnection * OnMakeConnection(void)

The type of wxConnection returned from a wxClient::MakeConnection call can be altered by deriving the OnMakeConnection member to return your own derived connection object. By default, an ordinary wxConnection object is returned.

The advantage of deriving your own connection class is that it will enable you to intercept messages initiated by the server, such as wxConnection::OnAdvise. You may also want to store application-specific data in instances of the new class.