unittest pass

This commit is contained in:
Benjamin Sergeant
2019-01-01 13:47:25 -08:00
parent cf340011e2
commit 8ed2399517
3 changed files with 42 additions and 10 deletions

View File

@ -8,8 +8,9 @@
#include <utility> // pair
#include <string>
#include <map>
#include <set>
#include <thread>
#include <mutex>
#include <functional>
#include "IXWebSocket.h"
@ -28,6 +29,9 @@ namespace ix
std::pair<bool, std::string> listen();
void run();
// FIXME: need mutex
std::set<WebSocket*> getClients() { return _clients; }
private:
void handleConnection(int fd);
@ -39,6 +43,6 @@ namespace ix
// socket for accepting connections
int _serverFd;
std::map<int, std::thread> _workers;
std::set<WebSocket*> _clients;
};
}