Skip to content

Commit

Permalink
Adding an optional loop function
Browse files Browse the repository at this point in the history
  • Loading branch information
madhephaestus committed Jul 27, 2019
1 parent f51030a commit 0b5c88e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/PacketEvent.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 0b5c88e

Please sign in to comment.