From 3977f2b96fb8cc2164bfe28ee094b3e661a2fad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Sun, 6 Oct 2019 16:51:27 +0200 Subject: Document the commands based Websocket interface The old interface with ok|reply|stop tuples is deprecated. --- plugins.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'plugins.mk') diff --git a/plugins.mk b/plugins.mk index 587b0a6..3fb2f7e 100644 --- a/plugins.mk +++ b/plugins.mk @@ -61,15 +61,15 @@ init(Req, State) -> {cowboy_websocket, Req, State}. websocket_init(State) -> - {ok, State}. + {[], State}. websocket_handle({text, Data}, State) -> - {reply, {text, Data}, State}; + {[{text, Data}], State}; websocket_handle({binary, Data}, State) -> - {reply, {binary, Data}, State}; + {[{binary, Data}], State}; websocket_handle(_Frame, State) -> - {ok, State}. + {[], State}. websocket_info(_Info, State) -> - {ok, State}. + {[], State}. endef -- cgit v1.2.3