Even though relating to definition it should:
-callback onconnect(websocket_req:req(), state()) ->
% Simple client: only server-initiated pings will be
% automatically responded to.
{ok, state()}
% Keepalive client: will automatically initiate a ping to the server
% every keepalive() ms.
| {ok, state(), keepalive()}
% Immediately send a message to the server.
| {reply, websocket_req:frame(), state()}
% Close the connection.
| {close, binary(), state()}.
Onconnect supports only {ok, state()} | {ok, state(), keepalive()}.
Even though relating to definition it should:
Onconnect supports only
{ok, state()} | {ok, state(), keepalive()}.