adds a callback for QPacketListener::Poll::on_event()