You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
415 B
23 lines
415 B
#pragma once
|
|
|
|
#include "ofMain.h"
|
|
#include "ofxNetwork.h"
|
|
#include "ofxJSONElement.h"
|
|
|
|
class TCPServer {
|
|
public:
|
|
static shared_ptr<TCPServer> instance();
|
|
|
|
void setup(int port);
|
|
void update();
|
|
void draw();
|
|
|
|
void send(int clientID, std::string message);
|
|
|
|
private:
|
|
TCPServer();
|
|
static shared_ptr<TCPServer> _instance;
|
|
|
|
ofxTCPServer _tcpServer;
|
|
std::map<int, bool> _tcpConnections;
|
|
};
|
|
|