From 5001fcbc345846efe2de6983e4f0784895b03ce8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 26 Jun 2018 10:59:22 +0200 Subject: Add missing frame types to websocket_handle specs/docs Thanks Artem. --- doc/src/manual/cowboy_websocket.asciidoc | 2 +- src/cowboy_websocket.erl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/src/manual/cowboy_websocket.asciidoc b/doc/src/manual/cowboy_websocket.asciidoc index d52bd83..d8b223c 100644 --- a/doc/src/manual/cowboy_websocket.asciidoc +++ b/doc/src/manual/cowboy_websocket.asciidoc @@ -31,7 +31,7 @@ Req :: cowboy_req:req() PartialReq :: map() State :: any() Opts :: cowboy_websocket:opts() -InFrame :: {text | binary | ping | pong, binary()} +InFrame :: ping | pong | {text | binary | ping | pong, binary()} OutFrame :: cow_ws:frame() %% see types below Info :: any() diff --git a/src/cowboy_websocket.erl b/src/cowboy_websocket.erl index 1469c00..48816d8 100644 --- a/src/cowboy_websocket.erl +++ b/src/cowboy_websocket.erl @@ -47,7 +47,7 @@ -> call_result(State) when State::any(). -optional_callbacks([websocket_init/1]). --callback websocket_handle({text | binary | ping | pong, binary()}, State) +-callback websocket_handle(ping | pong | {text | binary | ping | pong, binary()}, State) -> call_result(State) when State::any(). -callback websocket_info(any(), State) -> call_result(State) when State::any(). -- cgit v1.2.3