Skip to content

Instantly share code, notes, and snippets.

@Sushisource
Created August 11, 2013 03:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Sushisource/6203183 to your computer and use it in GitHub Desktop.
Save Sushisource/6203183 to your computer and use it in GitHub Desktop.
Simple websocket controller causing crash
-module(foosball_ingame_websocket).
-behaviour(boss_service_handler).
-export([init/0,
handle_incoming/5,
handle_join/4,
handle_close/4,
handle_broadcast/2,
handle_info/2,
terminate/2]).
init() ->
{ok, []}.
handle_join(ServiceURL, WebSocket, SessionId, State) ->
{reply, ok, State}.
handle_close(ServiceURL, WebSocket, SessionId, State) ->
{reply, ok, State}.
handle_incoming(ServiceURL, WebSocket, SessionId, Message, State) ->
{reply, Message, State}.
handle_broadcast(Message, State) ->
{noreply, State}.
handle_info(Info, State) ->
{noreply, State}.
terminate(Reason, State) -> ok.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment