ws_timeout_hibernate.erl 362 B

12345678910111213141516
  1. %% Feel free to use, reuse and abuse the code in this file.
  2. -module(ws_timeout_hibernate).
  3. -export([init/2]).
  4. -export([websocket_handle/2]).
  5. -export([websocket_info/2]).
  6. init(Req, _) ->
  7. {cowboy_websocket, Req, undefined, 1000, hibernate}.
  8. websocket_handle(_Frame, State) ->
  9. {ok, State, hibernate}.
  10. websocket_info(_Info, State) ->
  11. {ok, State, hibernate}.