Emits events before sending data