Add support for acknowledgement functions, if an event packet has an ack last argument becomes a callback