diff options
author | j.uhlig <[email protected]> | 2018-05-10 13:04:57 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-05-17 15:33:29 +0200 |
commit | e381ccccdff196ded3624162bc106aff09885e60 (patch) | |
tree | 296461b8b64c8f6bac0e77c4632fe8d747a70cb1 /doc/src/manual/ranch.asciidoc | |
parent | 03219f30c9f46012148297aad718805a5dc27991 (diff) | |
download | ranch-e381ccccdff196ded3624162bc106aff09885e60.tar.gz ranch-e381ccccdff196ded3624162bc106aff09885e60.tar.bz2 ranch-e381ccccdff196ded3624162bc106aff09885e60.zip |
Add a function to wait for number of connections
LH: Reworked validation style and added a -dialyzer
attribute to acceptor_SUITE to silence expected errors.
Diffstat (limited to 'doc/src/manual/ranch.asciidoc')
-rw-r--r-- | doc/src/manual/ranch.asciidoc | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/doc/src/manual/ranch.asciidoc b/doc/src/manual/ranch.asciidoc index b442f88..7fd18d0 100644 --- a/doc/src/manual/ranch.asciidoc +++ b/doc/src/manual/ranch.asciidoc @@ -120,7 +120,7 @@ Ref = ref():: Listener name. Return the status of the given listener. -=== get_transport_options(Ref) -> ProtoOpts +=== get_transport_options(Ref) -> TransOpts Ref = ref():: Listener name. TransOpts = any():: Current transport options. @@ -138,6 +138,7 @@ Return detailed information about all Ranch listeners. The following keys are defined: pid:: Pid of the listener's top-level supervisor. +status:: Listener status, either running or suspended. ip:: Interface Ranch listens on. port:: Port number Ranch listens on. num_acceptors:: Number of acceptor processes. @@ -149,6 +150,16 @@ transport_options:: Transport options. protocol:: Protocol module. protocol_options:: Protocol options. +=== info(Ref) -> [{Key, Value}] + +Ref = ref():: Listener name. +Key = atom():: Information key. +Value = any():: Information value. + +Return detailed information about a specific Ranch listener. + +See `info/0` for a description of the defined keys. + === procs(Ref, acceptors | connections) -> [pid()] Ref = ref():: Listener name. @@ -253,3 +264,12 @@ If the listener is already suspended, nothing will happen. The listener will stop listening and accepting connections by closing the listening port, but will not stop running connection processes. + +=== wait_for_connections(Ref, Operator, NumConnections) -> ok + +Ref = ref():: Listener name. +Operator = '>' | '>=' | '==' | '=<' | '<':: Comparison operator. +NumConnections = non_neg_integer():: Number of connections to wait for. + +Wait until the number of connections on the given listener matches +the given operator and number of connections.
\ No newline at end of file |