handshake_continue(Ref) -> {ok, Socket} handshake_continue(Ref, Opts) -> {ok, Socket} Ref :: ranch:ref() Opts :: any() Socket :: any()
ranch:handshake_continue - Resume the paused transport handshake
handshake_continue(Ref) -> {ok, Socket} handshake_continue(Ref, Opts) -> {ok, Socket} Ref :: ranch:ref() Opts :: any() Socket :: any()
Resume the paused transport handshake.
This function must be called by the protocol process in order to resume a paused handshake.
The listener name.
Transport handshake options.
Allowed options depend on the transport module.
An ok
tuple is returned containing the socket for the connection.
This function will trigger an exception when an error occurs.
start_link(Ref, Transport, Opts) -> Pid = proc_lib:spawn_link(?MODULE, init, [Ref, Transport, Opts]), {ok, Pid}. init(Ref, Transport, Opts) -> {continue, _Info} = ranch:handshake(Ref), {ok, Socket} = ranch:handshake_continue(Ref), loop(#state{ref=Ref, socket=Socket, transport=Transport, opts=Opts}).
Donate to Loïc Hoguin because his work on Cowboy, Ranch, Gun and Erlang.mk is fantastic:
Recurring payment options are also available via GitHub Sponsors. These funds are used to cover the recurring expenses like food, dedicated servers or domain names.