Skip to content

Instantly share code, notes, and snippets.

@mauser
Created November 28, 2016 19:22
Show Gist options
  • Save mauser/ff4de36198c32212eab98d1cad708d2d to your computer and use it in GitHub Desktop.
Save mauser/ff4de36198c32212eab98d1cad708d2d to your computer and use it in GitHub Desktop.
#include <iostream>
#include <atomic>
#ifndef WIN32
#include <unistd.h>
#endif
#include <lo/lo.h>
#include <lo/lo_cpp.h>
void errorHandler(int num, const char *msg, const char *where)
{
printf("liblo server error %d in path %s: %s\n", num, where, msg);
}
int main()
{
lo::ServerThread st(9000, errorHandler);
while(true)
{
#ifdef WIN32
Sleep(10);
#else
usleep(10*1000);
#endif
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment