GithubHelp home page GithubHelp logo

Add ping event about pawl HOT 1 CLOSED

maz0717 avatar maz0717 commented on August 29, 2024
Add ping event

from pawl.

Comments (1)

cboden avatar cboden commented on August 29, 2024 1

Upon receipt of a Ping frame, an endpoint MUST send a Pong frame in
response, unless it already received a Close frame. It SHOULD
respond with Pong frame as soon as is practical. Pong frames are
discussed in Section 5.5.3.

NOTE: A Ping frame may serve either as a keepalive or as a means to
verify that the remote endpoint is still responsive.


A Pong frame sent in response to a Ping frame must have identical
"Application data" as found in the message body of the Ping frame
being replied to.

A Pong frame MAY be sent unsolicited. This serves as a
unidirectional heartbeat. A response to an unsolicited Pong frame is
not expected.


When the specification states "endpoint" it means either client or server. Either side can send a ping for a connectivity check and expects a pong in response.

If the server sends a ping to Pawl, Pawl responds with a pong but does not inform the developer. This is because the server wants to know if the client is connected so the library responds and that is the extent of the transaction as far as the specification is concerned.

Pawl does not (currently) have its own heartbeat logic, so if the developer sends a ping frame to the server and the server responds with a pong it's up to the developer to choose what to do with it...the most likely (but not required as the specification was intentionally left ambiguous) action the developer will take is periodically send a ping frame and if a pong isn't received within a given amount of time close the connection - but if the pong is received and emitted will cancel the timeout to close the connection.

from pawl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.