aboutsummaryrefslogtreecommitdiffstats
path: root/src/gun_ws.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-06-03 20:31:09 +0200
committerLoïc Hoguin <[email protected]>2018-06-03 20:31:09 +0200
commit34307a584149abbf0b2e5b33beb2fca4c585b0d1 (patch)
treef44f3236287271ca0868262cb4401d1c1b88da38 /src/gun_ws.erl
parentca57baf279a164c4b9813267e6bbc96ed5b45ee8 (diff)
downloadgun-34307a584149abbf0b2e5b33beb2fca4c585b0d1.tar.gz
gun-34307a584149abbf0b2e5b33beb2fca4c585b0d1.tar.bz2
gun-34307a584149abbf0b2e5b33beb2fca4c585b0d1.zip
Change messages to gun_upgrade and gun_ws with stream reference
Diffstat (limited to 'src/gun_ws.erl')
-rw-r--r--src/gun_ws.erl8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gun_ws.erl b/src/gun_ws.erl
index 6501893..fe12448 100644
--- a/src/gun_ws.erl
+++ b/src/gun_ws.erl
@@ -16,7 +16,7 @@
-export([check_options/1]).
-export([name/0]).
--export([init/7]).
+-export([init/8]).
-export([handle/2]).
-export([close/2]).
-export([send/2]).
@@ -66,9 +66,9 @@ do_check_options([Opt|_]) ->
name() -> ws.
-init(Owner, Socket, Transport, Headers, Extensions, Handler, Opts) ->
- Owner ! {gun_ws_upgrade, self(), ok, Headers},
- HandlerState = Handler:init(Owner, Headers, Opts),
+init(Owner, Socket, Transport, StreamRef, Headers, Extensions, Handler, Opts) ->
+ Owner ! {gun_upgrade, self(), StreamRef, [<<"websocket">>], Headers},
+ HandlerState = Handler:init(Owner, StreamRef, Headers, Opts),
{upgrade, ?MODULE, #ws_state{owner=Owner, socket=Socket, transport=Transport,
extensions=Extensions, handler=Handler, handler_state=HandlerState}}.