Browse Source

Add cowboy_tcp_transport:name/0 to ease transport identification later on.

Loïc Hoguin 14 years ago
parent
commit
e0185dd27f
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/cowboy_tcp_transport.erl

+ 4 - 1
src/cowboy_tcp_transport.erl

@@ -13,11 +13,14 @@
 %% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 %% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 
 
 -module(cowboy_tcp_transport).
 -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]).
 	controlling_process/2, peername/1, close/1]).
 
 
 -include("include/types.hrl").
 -include("include/types.hrl").
 
 
+-spec name() -> tcp.
+name() -> tcp.
+
 -spec listen([{port, Port::port_number()}])
 -spec listen([{port, Port::port_number()}])
 	-> {ok, LSocket::socket()} | {error, Reason::posix()}.
 	-> {ok, LSocket::socket()} | {error, Reason::posix()}.
 listen(Opts) ->
 listen(Opts) ->