Gregor Féng
unread,May 30, 2014, 9:18:10 PM5/30/14Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to chica...@googlegroups.com
Hi all,
I experiment with websocket controller and most worked so far. I can
send messages between chicago boss and different browsers. So far, so
good. What I'm missing yet is the »SessionId«, that is always
»undefined«. I'm using version 0.8.12 and the source of the (very
simple) websocket is as follow:
------------------------------
-module(spw_msgs_websocket, [Req, SessionId]).
-behaviour(boss_service_handler).
-export([
handle_broadcast/2,
handle_close/4,
handle_incoming/4,
handle_join/3,
init/0,
terminate/2
]).
init() ->
io:format("-----init~n", []),
{ok, []}.
handle_join(_URL, _Pid, State) ->
{noreply, State}.
handle_close(_Reason, _URL, _Pid, State) ->
{noreply, State}.
handle_incoming(_URL, Pid, Message, State) ->
Pid ! {text, ["Answer to: " ++ Message]},
{noreply, State}.
handle_broadcast(_Message, State) ->
{noreply, State}.
terminate(_Reason, _State) ->
ok.
------------------------------
In the boss configuration is cowboy set. What's wrong with my setup?
Thanks people!