diff options
author | juhlig <[email protected]> | 2019-09-17 17:55:25 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2019-10-14 12:38:29 +0200 |
commit | d44e7a16f7d2823cc658e39b5d953ba0850e47ba (patch) | |
tree | 72ddf6100e12fa7424067262ee31b1f99ce05fff /doc/src/manual/ranch.handshake_cancel.asciidoc | |
parent | 1db8290685e9cff3dfafde62de6148246075990a (diff) | |
download | ranch-d44e7a16f7d2823cc658e39b5d953ba0850e47ba.tar.gz ranch-d44e7a16f7d2823cc658e39b5d953ba0850e47ba.tar.bz2 ranch-d44e7a16f7d2823cc658e39b5d953ba0850e47ba.zip |
Enable multiple steps handshake
Also fix some Protocol:start_link/4 into start_link/3
left over in the documentation.
Diffstat (limited to 'doc/src/manual/ranch.handshake_cancel.asciidoc')
-rw-r--r-- | doc/src/manual/ranch.handshake_cancel.asciidoc | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/doc/src/manual/ranch.handshake_cancel.asciidoc b/doc/src/manual/ranch.handshake_cancel.asciidoc new file mode 100644 index 0000000..6f742f5 --- /dev/null +++ b/doc/src/manual/ranch.handshake_cancel.asciidoc @@ -0,0 +1,55 @@ += ranch:handshake_cancel(3) + +== Name + +ranch:handshake_cancel - Cancel the paused transport handshake + +== Description + +[source,erlang] +---- +handshake_cancel(Ref :: ranch:ref()) -> ok +---- + +Cancel the paused transport handshake. + +This function may be called by the protocol process +to cancel a paused handshake. + +== Arguments + +Ref:: + +The listener name. ++ +Allowed options depend on the transport module. + +== Return value + +The return value depends on the transport module. + +== Changelog + +* *2.0*: Function introduced. + +== Examples + +.Cancel a paused transport handshake +[source,erlang] +---- +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), + ranch:handshake_cancel(Ref), + exit(handshake_cancelled). +---- + +== See also + +link:man:ranch:handshake(3)[ranch:handshake(3)], +link:man:ranch:handshake_continue(3)[ranch:handshake_continue(3)], +link:man:ranch(3)[ranch(3)] |