ArchAstro. Channel
(archastro v0.2.0)
Copy Markdown
A joined Phoenix Channel owned by an ArchAstro.Socket process.
Summary
Types
@type t() :: %ArchAstro.Channel{ join_response: ArchAstro.JSON.t() | struct(), module: module(), socket: GenServer.server(), topic: String.t() }
Functions
@spec join( GenServer.server(), String.t(), ArchAstro.JSON.object() | struct(), module(), ArchAstro.Codec.descriptor(), timeout() ) :: {:ok, t()} | {:error, ArchAstro.Error.reason()}
@spec leave(t(), timeout()) :: :ok | {:error, ArchAstro.Error.reason()}
@spec push( t(), String.t(), ArchAstro.JSON.object() | struct(), ArchAstro.Codec.descriptor(), timeout() ) :: {:ok, ArchAstro.JSON.t() | struct() | :ok} | {:error, ArchAstro.Error.reason()}
@spec subscribe(t(), String.t(), pid(), ArchAstro.Codec.descriptor()) :: :ok