Fixed heartbeat typos (#22)
This commit is contained in:
parent
310724c961
commit
afe8b966ad
@ -79,10 +79,10 @@ namespace ix
|
||||
return _perMessageDeflateOptions;
|
||||
}
|
||||
|
||||
void WebSocket::setHeartBeatPeriod(int hearBeatPeriod)
|
||||
void WebSocket::setHeartBeatPeriod(int heartBeatPeriod)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(_configMutex);
|
||||
_heartBeatPeriod = hearBeatPeriod;
|
||||
_heartBeatPeriod = heartBeatPeriod;
|
||||
}
|
||||
|
||||
int WebSocket::getHeartBeatPeriod() const
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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<std::chrono::steady_clock> _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();
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user