Skip to content

Instantly share code, notes, and snippets.

@elliotwoods
Last active February 11, 2016 06:59
Show Gist options
  • Save elliotwoods/1ce3a077cc8141d4e48e to your computer and use it in GitHub Desktop.
Save elliotwoods/1ce3a077cc8141d4e48e to your computer and use it in GitHub Desktop.
#pragma once
#include <stdint.h>
namespace ofxSquashBuddies {
struct Packet {
enum {
PacketSize = 4096,
HeaderSize = 9,
MaxPayloadSize = PacketSize - HeaderSize
};
//header
uint32_t packetIndex = 0;
uint32_t frameIndex;
bool isLastPacket = false;
size_t payloadSize = MaxPayloadSize;
//payload
uint8_t payload[MaxPayloadSize];
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment