View Source Barytherium.Network.Parser (barytherium v0.6.2)
The Parser
receives binary data from a Barytherium.Network.Receiver
process via casts, parses these into STOMP frames, then casts these on to the
listener process. If there's an error parsing, this is reported to
Barytherium.Network
as a disconnect.
If you call instead of cast, any parsed frames (or an empty list otherwise) will
be returned to the calling process, this is used by Receiver
to get the
CONNECTED frame, so it can call Network
to finish heartbeat negotiation.
Frames are passed via casts to listener_pid
, and include a list of frames, and the
process ID of the corresponding Barytherium.Network.Sender
. A frame list will always
include at least one frame.
spec: {:barytherium, :frames, {list(Barytherium.Frame.t()), pid()}}
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1
.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
Callback implementation for GenServer.init/1
.