aboutsummaryrefslogtreecommitdiffstats
path: root/src/ranch_transport.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-12-07 16:20:30 +0100
committerLoïc Hoguin <[email protected]>2013-12-07 16:20:30 +0100
commitc331076bad75ed89ff01c67d9e2c12688da7cc10 (patch)
treeed68d8e36537c9a867bbe23205abdef53e344777 /src/ranch_transport.erl
parent20a48ce65e0f14898e5027df080ec01813c1feb0 (diff)
downloadranch-c331076bad75ed89ff01c67d9e2c12688da7cc10.tar.gz
ranch-c331076bad75ed89ff01c67d9e2c12688da7cc10.tar.bz2
ranch-c331076bad75ed89ff01c67d9e2c12688da7cc10.zip
Add Transport:shutdown/2
Allows closing the socket in one or two directions.
Diffstat (limited to 'src/ranch_transport.erl')
-rw-r--r--src/ranch_transport.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ranch_transport.erl b/src/ranch_transport.erl
index 33c6fad..9188965 100644
--- a/src/ranch_transport.erl
+++ b/src/ranch_transport.erl
@@ -49,6 +49,8 @@
-> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}.
-callback sockname(socket())
-> {ok, {inet:ip_address(), inet:port_number()}} | {error, atom()}.
+-callback shutdown(socket(), read | write | read_write)
+ -> ok | {error, atom()}.
-callback close(socket()) -> ok.
%% A fallback for transports that don't have a native sendfile implementation.