Closed michaelboyles closed 8 months ago
This change allows heartbeat.message to accept a function which returns a string
heartbeat.message
My use-case is to send a ping which includes the send time from the client's perspective
{"_type": "ping", "timestamp": "2016-06-03T23:15:33.008Z"}
e.g.
useWebsocket(url, { heartbeat: { message: () => JSON.stringify({ type: 'ping', timestamp: currentTime() }) } }
@michaelboyles Released in 4.8.0!
This change allows
heartbeat.message
to accept a function which returns a stringMy use-case is to send a ping which includes the send time from the client's perspective
e.g.