Soulless.Packet.SpectatorRPC (Soulless v0.3.0)

Copy Markdown View Source

Summary

Types

cache()

@type cache() :: %{required(non_neg_integer()) => atom() | String.t()}

t()

@type t() :: %Soulless.Packet.SpectatorRPC{
  body: map(),
  kind: :request | :response,
  request_id: non_neg_integer() | nil,
  rpc: String.t()
}

Functions

parse(binary, rpc_name_cache)

@spec parse(binary(), cache()) :: {:ok, {t(), cache()}} | {:error, String.t()}

serialize(message)

@spec serialize(t()) :: binary()