Blur v0.2.1-beta3 Blur.Channel View Source

Channel module

Link to this section Summary

Functions

Add user to channel

Returns a specification to start this module under a supervisor.

Find user in channel

Get users process is from channel process

Remove user from channel

Get users in channel

Link to this section Functions

Specs

add_user(
  pid :: GenServer.server(),
  user :: %Blur.User{name: term(), opts: term()}
) :: :ok

Add user to channel

Returns a specification to start this module under a supervisor.

See Supervisor.

Specs

find_user(
  pid :: GenServer.server(),
  name :: %Blur.User{name: term(), opts: term()}
) :: %Blur.User{name: term(), opts: term()}

Find user in channel

Specs

get_users_pid(pid :: GenServer.server()) :: GenServer.server()

Get users process is from channel process

Specs

remove_user(
  pid :: GenServer.server(),
  user :: %Blur.User{name: term(), opts: term()}
) :: :ok

Remove user from channel

Link to this function

start_link(channel, users \\ [])

View Source

Specs

start_link(channel :: binary(), users :: list()) :: GenServer.on_start()

Specs

users(pid :: GenServer.server()) :: list() | {:error, atom()}

Get users in channel