Skip to content

Instantly share code, notes, and snippets.

@laheadle
Created January 2, 2013 02:49
Show Gist options
  • Save laheadle/4431732 to your computer and use it in GitHub Desktop.
Save laheadle/4431732 to your computer and use it in GitHub Desktop.
ffi.cdef[[
typedef void* tpeer;
tpeer peer_create(int isServer);
int peer_broadcast(tpeer peerIn, char* msg, unsigned int size);
void peer_destroy(tpeer p);
/* timeout is milliseconds */
int peer_select(tpeer peerIn, int timeout);
int peer_receive(tpeer peerIn, char* buf, int bufsize);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment