diff options
Diffstat (limited to 'src/gun_ws.erl')
-rw-r--r-- | src/gun_ws.erl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gun_ws.erl b/src/gun_ws.erl index 5379362..246cc57 100644 --- a/src/gun_ws.erl +++ b/src/gun_ws.erl @@ -14,9 +14,11 @@ -module(gun_ws). +-export([name/0]). -export([init/5]). -export([handle/2]). -export([send/2]). +-export([down/1]). -record(payload, { type = undefined :: cow_ws:frame_type(), @@ -40,6 +42,8 @@ extensions = #{} :: cow_ws:extensions() }). +name() -> ws. + %% @todo Protocols init(Owner, Socket, Transport, Extensions, _Protocols) -> Owner ! {gun_ws_upgrade, self(), ok}, @@ -123,3 +127,7 @@ send(Frame, State=#ws_state{socket=Socket, transport=Transport, extensions=Exten {close, _, _} -> close; _ -> State end. + +%% Websocket has no concept of streams. +down(_) -> + {[], []}. |