diff options
author | Ingela Anderton Andin <[email protected]> | 2016-09-02 12:10:39 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-09-05 10:44:50 +0200 |
commit | 81bec08c0ed2058e0030aeea874a1cfdb723f2f5 (patch) | |
tree | 5ec3b799ba8d72e7d2df78d5c3cce9b6c299ed84 | |
parent | 197ed04e8e2230fb011dc95e25089cad5141d460 (diff) | |
download | otp-81bec08c0ed2058e0030aeea874a1cfdb723f2f5.tar.gz otp-81bec08c0ed2058e0030aeea874a1cfdb723f2f5.tar.bz2 otp-81bec08c0ed2058e0030aeea874a1cfdb723f2f5.zip |
ssl: Add nodelay to packet=0|raw tests
-rw-r--r-- | lib/ssl/test/ssl_packet_SUITE.erl | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/lib/ssl/test/ssl_packet_SUITE.erl b/lib/ssl/test/ssl_packet_SUITE.erl index 17237118a0..dd48c3c329 100644 --- a/lib/ssl/test/ssl_packet_SUITE.erl +++ b/lib/ssl/test/ssl_packet_SUITE.erl @@ -1902,6 +1902,31 @@ header_decode_two_bytes_one_sent_passive(Config) when is_list(Config) -> %%-------------------------------------------------------------------- %% Internal functions ------------------------------------------------ %%-------------------------------------------------------------------- + +packet(Config, Data, Send, Recv, Quantity, Packet, Active) when Packet == 0; + Packet == raw -> + ClientOpts = ssl_test_lib:ssl_options(client_opts, Config), + ServerOpts = ssl_test_lib:ssl_options(server_opts, Config), + {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config), + + Server = ssl_test_lib:start_server([{node, ClientNode}, {port, 0}, + {from, self()}, + {mfa, {?MODULE, Send ,[Data, Quantity]}}, + {options, [{nodelay, true},{packet, Packet} | ServerOpts]}]), + Port = ssl_test_lib:inet_port(Server), + Client = ssl_test_lib:start_client([{node, ServerNode}, {port, Port}, + {host, Hostname}, + {from, self()}, + {mfa, {?MODULE, Recv, [Data, Quantity]}}, + {options, [{active, Active}, {nodelay, true}, + {packet, Packet} | + ClientOpts]}]), + + ssl_test_lib:check_result(Client, ok), + + ssl_test_lib:close(Server), + ssl_test_lib:close(Client); + packet(Config, Data, Send, Recv, Quantity, Packet, Active) -> ClientOpts = ssl_test_lib:ssl_options(client_opts, Config), ServerOpts = ssl_test_lib:ssl_options(server_opts, Config), |