aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2018-07-18 17:24:41 +0200
committerLoïc Hoguin <[email protected]>2018-07-18 17:24:41 +0200
commit8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a (patch)
tree8cfcf87f69be525252addd32d880abb8ad02a1ad /src
parenta230411488fe2d8ae1e8bf414a4fe4ecf3662a83 (diff)
downloadranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.tar.gz
ranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.tar.bz2
ranch-8b4c6f4bf9880d59bbc012b6ba9d5e60c4f62b3a.zip
Add one manual per function for the ranch module
Also review and update the ranch(7) manual and fix a few specs.
Diffstat (limited to 'src')
-rw-r--r--src/ranch.erl6
-rw-r--r--src/ranch_transport.erl2
2 files changed, 4 insertions, 4 deletions
diff --git a/src/ranch.erl b/src/ranch.erl
index c0f86a9..424d4d7 100644
--- a/src/ranch.erl
+++ b/src/ranch.erl
@@ -181,7 +181,7 @@ stop_listener(Ref) ->
{error, Reason}
end.
--spec suspend_listener(ref()) -> ok | {error, term()}.
+-spec suspend_listener(ref()) -> ok | {error, any()}.
suspend_listener(Ref) ->
case get_status(Ref) of
running ->
@@ -192,7 +192,7 @@ suspend_listener(Ref) ->
ok
end.
--spec resume_listener(ref()) -> ok | {error, term()}.
+-spec resume_listener(ref()) -> ok | {error, any()}.
resume_listener(Ref) ->
case get_status(Ref) of
running ->
@@ -263,7 +263,7 @@ remove_connection(Ref) ->
ConnsSup ! {remove_connection, Ref, self()},
ok.
--spec get_status(ref()) -> running | suspended | restarting.
+-spec get_status(ref()) -> running | suspended.
get_status(Ref) ->
ListenerSup = ranch_server:get_listener_sup(Ref),
Children = supervisor:which_children(ListenerSup),
diff --git a/src/ranch_transport.erl b/src/ranch_transport.erl
index e2a0fd4..08263d3 100644
--- a/src/ranch_transport.erl
+++ b/src/ranch_transport.erl
@@ -116,7 +116,7 @@ chunk_size(Opts) ->
-spec sendfile_loop(module(), socket(), file:fd(), non_neg_integer(),
non_neg_integer(), pos_integer())
- -> {ok, non_neg_integer()} | {error, term()}.
+ -> {ok, non_neg_integer()} | {error, any()}.
sendfile_loop(_Transport, _Socket, _RawFile, Sent, Sent, _ChunkSize)
when Sent =/= 0 ->
%% All requested data has been read and sent, return number of bytes sent.