diff options
author | Loïc Hoguin <[email protected]> | 2014-06-03 13:39:34 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-06-03 13:39:34 +0200 |
commit | bde897599927c354f942ca74be40d21c6734c768 (patch) | |
tree | 2844e50eee82f3b6ab77b8ca24d31f6671d72a6c /test/check_tcp_options.erl | |
parent | a224a9b5b1e485ccfbd826bd2e03054379d3e94e (diff) | |
parent | bac2faea84357980ce20d5ebcaa34f0550e0447a (diff) | |
download | ranch-bde897599927c354f942ca74be40d21c6734c768.tar.gz ranch-bde897599927c354f942ca74be40d21c6734c768.tar.bz2 ranch-bde897599927c354f942ca74be40d21c6734c768.zip |
Merge branch 'fix_inherit' of git://github.com/nevar/ranch
Diffstat (limited to 'test/check_tcp_options.erl')
-rw-r--r-- | test/check_tcp_options.erl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/check_tcp_options.erl b/test/check_tcp_options.erl new file mode 100644 index 0000000..18432ac --- /dev/null +++ b/test/check_tcp_options.erl @@ -0,0 +1,15 @@ +-module(check_tcp_options). +-behaviour(ranch_protocol). + +-export([start_link/4]). +-export([init/3]). + +start_link(_, Socket, _, [{pid, TestPid}|TcpOptions]) -> + {ok, RealTcpOptions} = + inet:getopts(Socket, [Key || {Key, _} <- TcpOptions]), + Pid = spawn_link(?MODULE, init, [TestPid, RealTcpOptions, TcpOptions]), + {ok, Pid}. + +init(Pid, TcpOptions, TcpOptions) -> + Pid ! checked, + receive after 2500 -> ok end. |