nova_websocket behaviour (NOVA vv0.8.0)
Link to this section Summary
Link to this section Types
Link to this type
call_result/0
Specs
call_result() ::
{ok, State :: map()} |
{ok, State :: map(), hibernate} |
{reply, OutFrame :: cow_ws:frame() | [OutFrame :: cow_ws:frame()], State :: map()} |
{reply, OutFrame :: cow_ws:frame() | [OutFrame :: cow_ws:frame()], State :: map(), hibernate} |
{stop, State :: map()}.
Link to this type
in_frame/0
Specs
in_frame() :: ping | pong | {text | binary | ping | pong, binary()}.
Link to this section Callbacks
Link to this callback
init/1
Specs
init(State :: map()) -> {ok, State0 :: map()} | any().
Specs
terminate(Reason :: reason(), PartialReq :: map(), State :: map()) -> ok.
Link to this callback
websocket_handle/2
Specs
websocket_handle(Frame :: in_frame(), State :: map()) -> call_result().
Link to this callback
websocket_info/2
Specs
websocket_info(Info :: any(), State :: map()) -> call_result().
Specs
websocket_init(State :: map()) -> Result :: call_result().