diff --git a/ixwebsocket/IXWebSocket.cpp b/ixwebsocket/IXWebSocket.cpp index d0cdee5b..9b08bf5f 100644 --- a/ixwebsocket/IXWebSocket.cpp +++ b/ixwebsocket/IXWebSocket.cpp @@ -79,10 +79,10 @@ namespace ix return _perMessageDeflateOptions; } - void WebSocket::setHeartBeatPeriod(int hearBeatPeriod) + void WebSocket::setHeartBeatPeriod(int heartBeatPeriod) { std::lock_guard lock(_configMutex); - _heartBeatPeriod = hearBeatPeriod; + _heartBeatPeriod = heartBeatPeriod; } int WebSocket::getHeartBeatPeriod() const diff --git a/ixwebsocket/IXWebSocket.h b/ixwebsocket/IXWebSocket.h index 1c7fa5c1..8b35ebe1 100644 --- a/ixwebsocket/IXWebSocket.h +++ b/ixwebsocket/IXWebSocket.h @@ -89,7 +89,7 @@ namespace ix void setUrl(const std::string& url); void setPerMessageDeflateOptions(const WebSocketPerMessageDeflateOptions& perMessageDeflateOptions); void setHandshakeTimeout(int handshakeTimeoutSecs); - void setHeartBeatPeriod(int hearBeatPeriod); + void setHeartBeatPeriod(int heartBeatPeriod); // Run asynchronously, by calling start and stop. void start(); diff --git a/ixwebsocket/IXWebSocketTransport.cpp b/ixwebsocket/IXWebSocketTransport.cpp index 485ec589..8eca5b5a 100644 --- a/ixwebsocket/IXWebSocketTransport.cpp +++ b/ixwebsocket/IXWebSocketTransport.cpp @@ -53,7 +53,7 @@ namespace ix { - const std::string WebSocketTransport::kHeartBeatPingMessage("ixwebsocket::hearbeat"); + const std::string WebSocketTransport::kHeartBeatPingMessage("ixwebsocket::heartbeat"); const int WebSocketTransport::kDefaultHeartBeatPeriod(-1); constexpr size_t WebSocketTransport::kChunkSize; @@ -75,11 +75,11 @@ namespace ix } void WebSocketTransport::configure(const WebSocketPerMessageDeflateOptions& perMessageDeflateOptions, - int hearBeatPeriod) + int heartBeatPeriod) { _perMessageDeflateOptions = perMessageDeflateOptions; _enablePerMessageDeflate = _perMessageDeflateOptions.enabled(); - _heartBeatPeriod = hearBeatPeriod; + _heartBeatPeriod = heartBeatPeriod; } // Client diff --git a/ixwebsocket/IXWebSocketTransport.h b/ixwebsocket/IXWebSocketTransport.h index 6c2c2853..45b17944 100644 --- a/ixwebsocket/IXWebSocketTransport.h +++ b/ixwebsocket/IXWebSocketTransport.h @@ -61,7 +61,7 @@ namespace ix ~WebSocketTransport(); void configure(const WebSocketPerMessageDeflateOptions& perMessageDeflateOptions, - int hearBeatPeriod); + int heartBeatPeriod); WebSocketInitResult connectToUrl(const std::string& url, // Client int timeoutSecs); @@ -148,7 +148,7 @@ namespace ix mutable std::mutex _lastSendTimePointMutex; std::chrono::time_point _lastSendTimePoint; - // No data was send through the socket for longer that the hearbeat period + // No data was send through the socket for longer that the heartbeat period bool heartBeatPeriodExceeded(); void sendOnSocket(); diff --git a/test/IXWebSocketHeartBeatTest.cpp b/test/IXWebSocketHeartBeatTest.cpp index 05314aac..52e01b60 100644 --- a/test/IXWebSocketHeartBeatTest.cpp +++ b/test/IXWebSocketHeartBeatTest.cpp @@ -65,7 +65,7 @@ namespace _webSocket.setUrl(url); // The important bit for this test. - // Set a 1 second hearbeat ; if no traffic is present on the connection for 1 second + // Set a 1 second heartbeat ; if no traffic is present on the connection for 1 second // a ping message will be sent by the client. _webSocket.setHeartBeatPeriod(1);