use select to detect new incoming connections

This commit is contained in:
Benjamin Sergeant
2019-01-01 22:21:07 -08:00
parent 0b90f7df1b
commit 6bfabd5493
2 changed files with 22 additions and 9 deletions

View File

@ -83,7 +83,7 @@ namespace
void WebSocketChat::start()
{
std::string url("ws://localhost:8080/");
std::string url("ws://localhost:8090/");
_webSocket.setUrl(url);
std::stringstream ss;
@ -232,9 +232,9 @@ TEST_CASE("Websocket chat", "[websocket_chat]")
{
ix::setupWebSocketTrafficTrackerCallback();
int port = 8080;
int port = 8090;
ix::WebSocketServer server(port);
startServer(server);
REQUIRE(startServer(server));
std::string session = ix::generateSessionId();
WebSocketChat chatA("jean", session);