Receive a message, most commonly from the socket.
Receive a message, most commonly from the socket. Received messages are considered owned by the PushSession meaning the session is responsible for cleaning up any associated resources.
The current availability Status of this PushSession.
Representation of a push-based protocol session.
The PushSession is intended to be used with the PushChannelHandle abstraction to provide the interface for building a push-based protocol implementation. In this pattern, events coming from the socket are 'pushed' into the session via the
receivemethod with well defined thread behavior. Specifically, thereceivemethod will be called with new events from the single-threadedExecutoravailable in the associated PushChannelHandle. This provides two key benefits for push-based protocol implementations: - We remove the overhead of theFutureabstraction intrinsic to theTransportandDispatcherbased model. - The session itself provides a clear pattern for managing synchronization that works well with thePromiseabstraction by avoiding explicit synchronization. See theREADME.mdfor more details.