diff options
Diffstat (limited to 'manual/ranch_protocol.md')
-rw-r--r-- | manual/ranch_protocol.md | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/manual/ranch_protocol.md b/manual/ranch_protocol.md deleted file mode 100644 index 807d20a..0000000 --- a/manual/ranch_protocol.md +++ /dev/null @@ -1,42 +0,0 @@ -ranch_protocol -============== - -The `ranch_protocol` behaviour defines the interface used -by Ranch protocols. - -Types ------ - -None. - -Callbacks ---------- - -### start_link(Ref, Socket, Transport, ProtoOpts) -> {ok, pid()} | {ok, pid(), pid()} - -> Types: -> * Ref = ranch:ref() -> * Socket = any() -> * Transport = module() -> * ProtoOpts = any() -> -> Start a new connection process for the given socket. -> -> The only purpose of this callback is to start a process that -> will handle the socket. It must spawn the process, link and -> then return the new pid. This function will always be called -> from inside a supervisor. -> -> This callback can also return two pids. The first pid is the -> pid of the process that will be supervised. The second pid is -> the pid of the process that will receive ownership of the -> socket. This second process must be a child of the first. This -> form is only available when `connection_type` is set to -> `supervisor`. -> -> If any other value is returned, the supervisor will close the -> socket and assume no process has been started. -> -> Do not perform any operations in this callback, as this would -> block the supervisor responsible for starting connection -> processes and degrade performance severely. |