diff --git a/examples/echo_server/echo_server.cpp b/examples/echo_server/echo_server.cpp index 1d35808d..5a9e879a 100644 --- a/examples/echo_server/echo_server.cpp +++ b/examples/echo_server/echo_server.cpp @@ -33,13 +33,17 @@ int main(int argc, char** argv) { if (messageType == ix::WebSocket_MessageType_Open) { - std::cout << "New connection" << std::endl; - std::cout << "Headers:" << std::endl; + std::cerr << "New connection" << std::endl; + std::cerr << "Headers:" << std::endl; for (auto it : headers) { std::cerr << it.first << ": " << it.second << std::endl; } } + else if (messageType == ix::WebSocket_MessageType_Close) + { + std::cerr << "Closed connection" << std::endl; + } else if (messageType == ix::WebSocket_MessageType_Message) { std::cerr << str << std::endl;