[erlang-questions] Gun and websockets

Alexey D. Semiletov spyl@REDACTED
Sat Sep 20 10:32:42 CEST 2014


I got same problem. Have any news about this issue?
Nothing happens after getting message through loop/1 in gun.erl when
matching this clause:

          {ws_upgrade, Owner, Path, Headers} when Protocol =/= gun_spdy ->

            %% @todo

            io:format("we are ws_upgrade clause",[]),

            ProtoState2 = Protocol:ws_upgrade(ProtoState,

                Path, Headers),

            io:format("going to loop with ProtoState2~n",[ProtoState2]),

            ws_loop(State#state{protocol=gun_ws, protocol_state=
ProtoState2});


io:format("going to loop with ProtoState2~n",[ProtoState2]) never happens.


On 14 August 2014 05:20, Robert Virding <rvirding@REDACTED> wrote:

> I had gotten the answer in #erlang chat but missed it. It is depressingly
> simple, it is not implemented yet. :-(
>
> Robert
>
>
>
> On 13 August 2014 14:57, Robert Virding <rvirding@REDACTED> wrote:
>
>> I am having problems trying to open a websocket with gun
>> https://github.com/extend/gun. So I have been trying:
>>
>> {ok,Pid} = gun:open("10.0.1.86", 8080, [{type,tcp}]),
>> gun:ws_upgrade(Pid, "/content/chats/connect/"),
>>
>> and nothing happens, it just times out. Checking, the process Pid started
>> by gun:open dies with an undef error but I don't see which function it is
>> trying to call. Using http://www.websocket.org/echo.html and opening
>> ws://10.0.1.86:8080/content/chats/connect works fine.
>>
>> Any suggestions?
>>
>> Robert
>>
>>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
> --
> <http://erlang.org/mailman/listinfo/erlang-questions>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20140920/a83a499e/attachment.htm>


More information about the erlang-questions mailing list