dont print identify message to console

mainly since i feel its only a matter of time before someone copy pastes it somewhere and itd be my fault
also typedef -> using
This commit is contained in:
ouwou
2021-11-25 02:57:11 -05:00
parent 0da913cd4a
commit 8c72d4c18d
3 changed files with 21 additions and 4 deletions

View File

@@ -15,6 +15,14 @@ void Websocket::SetUserAgent(std::string agent) {
m_agent = agent;
}
bool Websocket::GetPrintMessages() const noexcept {
return m_print_messages;
}
void Websocket::SetPrintMessages(bool show) noexcept {
m_print_messages = show;
}
void Websocket::Stop() {
Stop(ix::WebSocketCloseConstants::kNormalClosureCode);
}
@@ -29,7 +37,8 @@ bool Websocket::IsOpen() const {
}
void Websocket::Send(const std::string &str) {
printf("sending %s\n", str.c_str());
if (m_print_messages)
printf("sending %s\n", str.c_str());
m_websocket.sendText(str);
}