mirror of
https://github.com/ninenines/cowboy.git
synced 2025-07-14 12:20:24 +00:00
Add cowboy_tcp_transport:name/0 to ease transport identification later on.
This commit is contained in:
parent
3865415a60
commit
e0185dd27f
1 changed files with 4 additions and 1 deletions
|
@ -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) ->
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue