-
-
Save mauser/ff4de36198c32212eab98d1cad708d2d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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