mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
[wpiutil] WebSocket: Add GetLastReceivedTime
This allows getting the timestamp that any data has been received.
This commit is contained in:
@@ -418,6 +418,8 @@ static inline void Unmask(std::span<uint8_t> data,
|
||||
}
|
||||
|
||||
void WebSocket::HandleIncoming(uv::Buffer& buf, size_t size) {
|
||||
m_lastReceivedTime = m_stream.GetLoopRef().Now().count();
|
||||
|
||||
// ignore incoming data if we're failed or closed
|
||||
if (m_state == FAILED || m_state == CLOSED) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user