Invoke callback on pings and pongs (API Change):

fix #248

This additionally invokes the pong callback for received pings, allowing
callers to more efficiently detect when a connection is still lively:

* pong_callback renamed to ping_callback
* Callback signature has an extra `bool` to indicate if the received
  control frame is a ping or pong.
This commit is contained in:
Vinnie Falco committed 2017-07-20 08:12:14 -07:00
1 parent a5a6563fe2
commit 765cb22b48
9 files changed
+131 -107

No files matched your search

+1 -1
View File
@@ -76,7 +76,7 @@ reset()
wr_close_ = false;
wr_.cont = false;
wr_block_ = nullptr; // should be nullptr on close anyway
pong_data_ = nullptr; // should be nullptr on close anyway
ping_data_ = nullptr; // should be nullptr on close anyway
stream_.buffer().consume(
stream_.buffer().size());