Wobserver v0.1.4 Wobserver.Web.Client

Modules handles WebSocket connects to the client.

Summary

Functions

Handles messages coming from the WS client

Handles messages coming from other processes

Initalizes the WebSocket

Callback implementation for c::cowboy_websocket_handler.websocket_handle/3

Callback implementation for c::cowboy_websocket_handler.websocket_info/3

Callback implementation for c::cowboy_websocket_handler.websocket_init/3

Callback implementation for c::cowboy_websocket_handler.websocket_terminate/3

Functions

client_handle(custom, state)
client_handle(:hello, state :: map) :: {:reply, :ehlo, map}
client_handle(:ping, state :: map) :: {:reply, :ehlo, map}
client_handle(:system, state :: map) :: {:reply, :ehlo, map, map}
client_handle(:about, state :: map) :: {:reply, :about, map, map}
client_handle(:application, state :: map) :: {:reply, :about, map, map}
client_handle([atom], state :: map) :: {:reply, :about, map, map}
client_handle(:process, state :: map) :: {:reply, :about, map, map}
client_handle([atom], state :: map) :: {:reply, :about, map, map}
client_handle(:ports, state :: map) :: {:reply, :about, map, map}
client_handle(:allocators, state :: map) :: {:reply, :about, map, map}
client_handle(:table, state :: map) :: {:reply, :about, map, map}
client_handle([atom], state :: map) :: {:reply, :about, map, map}
client_handle(:custom, state :: map) :: {:reply, :about, map, map}
client_handle(atom, state :: map) ::
  {:reply, atom, map, map} |
  {:noreply, map}

Handles messages coming from the WS client.

Return browser response.

Callback implementation for Wobserver.Web.ClientSocket.client_handle/2.

client_info(do, state)
client_info(any, state :: map) :: {:noreply, map}

Handles messages coming from other processes.

Return browser response.

Callback implementation for Wobserver.Web.ClientSocket.client_info/2.

client_init()

Initalizes the WebSocket.

Return {:ok, initial state} or {:ok, initial state, socket timeout}.

Callback implementation for Wobserver.Web.ClientSocket.client_init/0.

init(, req, opts)
init(any, :cowboy_req.req, any) :: {:upgrade, :protocol, :cowboy_websocket}
websocket_handle(message, req, state)
websocket_handle({:text, String.t}, req :: :cowboy_req.req, state :: any) ::
  {:reply, {:text, String.t}, :cowboy_req.req, any} |
  {:ok, :cowboy_req.req, any}

Callback implementation for c::cowboy_websocket_handler.websocket_handle/3.

websocket_info(message, req, state)
websocket_info(message :: any, req :: :cowboy_req.req, state :: any) ::
  {:reply, {:text, String.t}, :cowboy_req.req, any} |
  {:ok, :cowboy_req.req, any}

Callback implementation for c::cowboy_websocket_handler.websocket_info/3.

websocket_init(type, req, opts)
websocket_init(any, req :: :cowboy_req.req, any) :: {:ok, :cowboy_req.req, any, non_neg_integer}

Callback implementation for c::cowboy_websocket_handler.websocket_init/3.

websocket_terminate(reason, req, state)
websocket_terminate({atom, any}, :cowboy_req.req, any) :: :ok

Callback implementation for c::cowboy_websocket_handler.websocket_terminate/3.