Skip to content

v2.0.1

Latest
Compare
Choose a tag to compare
@oe oe released this 22 Aug 15:03

Add parameter heartbeatTimeout to the constructor of each class

heartbeatTimeout is timeout(milliseconds) for waiting heartbeat message, default 500ms

  1. A heartbeat message will be sent to peer immediately when a request message is received
    and there is at least one handler for it. Or the emit method will catch a no handler error
    It has nothing to do with the time of handler execution, there is no timeout
    for handler execution
  2. Normally, a heartbeat message will be sent to peer in less then 10 ms,
    but you may still need to set a longer timeout if browser is heavy loaded
    and the native apis are slow