add a print statement when the connection is closed / still need to terminate server thread

This commit is contained in:
Benjamin Sergeant 2018-12-31 12:47:42 -08:00
parent f8373dc666
commit a39278f7be

View File

@ -33,13 +33,17 @@ int main(int argc, char** argv)
{ {
if (messageType == ix::WebSocket_MessageType_Open) if (messageType == ix::WebSocket_MessageType_Open)
{ {
std::cout << "New connection" << std::endl; std::cerr << "New connection" << std::endl;
std::cout << "Headers:" << std::endl; std::cerr << "Headers:" << std::endl;
for (auto it : headers) for (auto it : headers)
{ {
std::cerr << it.first << ": " << it.second << std::endl; 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) else if (messageType == ix::WebSocket_MessageType_Message)
{ {
std::cerr << str << std::endl; std::cerr << str << std::endl;