aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_tcp_transport.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-03-22 19:40:28 +0100
committerLoïc Hoguin <[email protected]>2011-03-22 19:40:28 +0100
commite0185dd27fef66a1fc9a92db9c1a75cc8a130821 (patch)
tree2f4f8b858e4ae2be05655f510f1fadd9c4b7307e /src/cowboy_tcp_transport.erl
parent3865415a601fe412609b095e7bcb281c735edec3 (diff)
downloadcowboy-e0185dd27fef66a1fc9a92db9c1a75cc8a130821.tar.gz
cowboy-e0185dd27fef66a1fc9a92db9c1a75cc8a130821.tar.bz2
cowboy-e0185dd27fef66a1fc9a92db9c1a75cc8a130821.zip
Add cowboy_tcp_transport:name/0 to ease transport identification later on.
Diffstat (limited to 'src/cowboy_tcp_transport.erl')
-rw-r--r--src/cowboy_tcp_transport.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/cowboy_tcp_transport.erl b/src/cowboy_tcp_transport.erl
index 8dcc9d7..5bc80fe 100644
--- a/src/cowboy_tcp_transport.erl
+++ b/src/cowboy_tcp_transport.erl
@@ -13,11 +13,14 @@
%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-module(cowboy_tcp_transport).
--export([listen/1, accept/1, recv/3, send/2, setopts/2,
+-export([name/0, listen/1, accept/1, recv/3, send/2, setopts/2,
controlling_process/2, peername/1, close/1]).
-include("include/types.hrl").
+-spec name() -> tcp.
+name() -> tcp.
+
-spec listen([{port, Port::port_number()}])
-> {ok, LSocket::socket()} | {error, Reason::posix()}.
listen(Opts) ->