Packages

Provides an abstraction of the RTMP protocol and represents a single peer in an RTMP connection

Current section

Files

Jump to
eml_rtmp_session lib rtmp_session messages abort.ex
Raw

lib/rtmp_session/messages/abort.ex

defmodule RtmpSession.Messages.Abort do
@moduledoc """
Message used to notify the peer that if it is waiting
for chunks to complete a message, then discard the partially
received message
"""
@behaviour RtmpSession.RawMessage
@type t :: %__MODULE__{}
defstruct stream_id: nil
def deserialize(data) do
<<stream_id::32>> = data
%__MODULE__{stream_id: stream_id}
end
def serialize(message = %__MODULE__{}) do
{:ok, <<message.stream_id::size(4)-unit(8)>>}
end
def get_default_chunk_stream_id(%__MODULE__{}), do: 2
end