From 0b5c88e4703dc29e4fcad46bfcc20e1a04d1086b Mon Sep 17 00:00:00 2001 From: Kevin Harrington Date: Sat, 27 Jul 2019 11:03:53 -0400 Subject: [PATCH] Adding an optional loop function --- src/PacketEvent.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PacketEvent.h b/src/PacketEvent.h index 947ee74..b1e4dd9 100644 --- a/src/PacketEvent.h +++ b/src/PacketEvent.h @@ -14,6 +14,12 @@ class PacketEventAbstract { // Buffer contains data from the packet coming in at the start of the function // User data is written into the buffer to send it back virtual void event(float * buffer)=0; + /** + * An optional loop function + * If your server needs a pulse to keep it updated, implement this function + */ + virtual bool loop(){return false;} + uint32_t getId() { return myId; }