Skip to content

Commit c4ec694

Browse files
committed
elli_websocket: cosmetic tweaks
1 parent 56858aa commit c4ec694

File tree

1 file changed

+16
-18
lines changed

1 file changed

+16
-18
lines changed

src/elli_websocket.erl

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -38,27 +38,26 @@
3838

3939
-type payload() :: binary() | iolist().
4040

41-
-type message() ::
42-
{text, payload()} |
43-
{binary, payload()} |
44-
{ping, payload()} |
45-
{pong, payload()}.
41+
-type message() :: {text, payload()} |
42+
{binary, payload()} |
43+
{ping, payload()} |
44+
{pong, payload()}.
4645

47-
-type event() ::
48-
websocket_open | websocket_close |
49-
websocket_throw | websocket_error | websocket_exit.
46+
-type event() ::
47+
websocket_open | websocket_close |
48+
websocket_throw | websocket_error | websocket_exit.
5049

5150

52-
% Args: proplist with settings.
53-
% handler: Websocket callback module
54-
% handler_opts: Options to pass to the websocket_init
55-
% callback.
56-
% resp_compress: bool(), when set to true the traffic
57-
% will be compressed if the client supports it.
58-
%
51+
%% Args: proplist with settings.
52+
%% handler: Websocket callback module
53+
%% handler_opts: Options to pass to the websocket_init
54+
%% callback.
55+
%% resp_compress: bool(), when set to true the traffic
56+
%% will be compressed if the client supports it.
57+
%%
5958

60-
% @doc Upgrade the request to a websocket, will respond with
61-
% bad request when something is wrong.
59+
%% @doc Upgrade the request to a websocket, will respond with
60+
%% bad request when something is wrong.
6261
-spec upgrade(Req :: elli:req(), list()) -> ok.
6362
upgrade(Req, Args) ->
6463
RespCompress = proplists:get_value(resp_compress, Args, false),
@@ -69,4 +68,3 @@ upgrade(Req, Args) ->
6968
%% Adapter is ready, hand over to ws_protocol
7069
_UpgradeResponse = elli_ws_protocol:upgrade(ReqAdapter, Args, Handler, HandlerOpts),
7170
ok.
72-

0 commit comments

Comments
 (0)