Spikard.WebSocketMessage (spikard v0.15.6-rc.9)

Copy Markdown

A WebSocket message that can be text or binary.

Summary

Types

A binary message.

A close message with a numeric close code (RFC 6455) and optional reason text.

A ping message.

A pong message.

t()

A WebSocket message that can be text or binary.

A text message.

Types

binary_variant()

@type binary_variant() :: %{type: :binary, value: binary()}

A binary message.

close()

@type close() :: %{type: :close, code: non_neg_integer(), reason: String.t()}

A close message with a numeric close code (RFC 6455) and optional reason text.

ping()

@type ping() :: %{type: :ping, value: binary()}

A ping message.

pong()

@type pong() :: %{type: :pong, value: binary()}

A pong message.

t()

@type t() :: term()

A WebSocket message that can be text or binary.

text()

@type text() :: %{type: :text, value: String.t()}

A text message.