diff options
author | Loïc Hoguin <[email protected]> | 2025-02-14 13:24:52 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2025-02-14 13:24:52 +0100 |
commit | 6d6374a1397ba21cc43b6dff6cfc911aeac87809 (patch) | |
tree | c50c6f7c140fdbcc06008b9b91d643cc8b341e54 | |
parent | 865595b7949a8570e87c638d4e782067d0a06a51 (diff) | |
download | ranch-6d6374a1397ba21cc43b6dff6cfc911aeac87809.tar.gz ranch-6d6374a1397ba21cc43b6dff6cfc911aeac87809.tar.bz2 ranch-6d6374a1397ba21cc43b6dff6cfc911aeac87809.zip |
Don't explicitly set {packet,raw} in all places
-rw-r--r-- | src/ranch_ssl.erl | 4 | ||||
-rw-r--r-- | src/ranch_tcp.erl | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/ranch_ssl.erl b/src/ranch_ssl.erl index aa70357..79dd316 100644 --- a/src/ranch_ssl.erl +++ b/src/ranch_ssl.erl @@ -226,7 +226,7 @@ handshake_cancel(CSocket) -> -> {ok, inet:socket()} | {error, atom()}. connect(Host, Port, Opts) when is_integer(Port) -> ssl:connect(Host, Port, - Opts ++ [binary, {active, false}, {packet, raw}]). + Opts ++ [binary, {active, false}]). %% @todo Probably filter Opts? -spec connect(inet:ip_address() | inet:hostname(), @@ -234,7 +234,7 @@ connect(Host, Port, Opts) when is_integer(Port) -> -> {ok, inet:socket()} | {error, atom()}. connect(Host, Port, Opts, Timeout) when is_integer(Port) -> ssl:connect(Host, Port, - Opts ++ [binary, {active, false}, {packet, raw}], + Opts ++ [binary, {active, false}], Timeout). -spec recv(ssl:sslsocket(), non_neg_integer(), timeout()) diff --git a/src/ranch_tcp.erl b/src/ranch_tcp.erl index 4066820..d3370d5 100644 --- a/src/ranch_tcp.erl +++ b/src/ranch_tcp.erl @@ -108,7 +108,7 @@ prepare_socket_opts(SocketOpts0, Logger) -> SocketOpts3 = ranch:set_option_default(SocketOpts2, send_timeout, 30000), SocketOpts4 = ranch:set_option_default(SocketOpts3, send_timeout_close, true), ranch:filter_options(SocketOpts4, disallowed_listen_options(), - [binary, {active, false}, {packet, raw}, {reuseaddr, true}], Logger). + [binary, {active, false}, {reuseaddr, true}], Logger). %% 'binary' and 'list' are disallowed but they are handled %% specifically as they do not have 2-tuple equivalents. @@ -147,7 +147,7 @@ handshake_cancel(_) -> -> {ok, inet:socket()} | {error, atom()}. connect(Host, Port, Opts) when is_integer(Port) -> gen_tcp:connect(Host, Port, - Opts ++ [binary, {active, false}, {packet, raw}]). + Opts ++ [binary, {active, false}]). %% @todo Probably filter Opts? -spec connect(inet:ip_address() | inet:hostname(), @@ -155,7 +155,7 @@ connect(Host, Port, Opts) when is_integer(Port) -> -> {ok, inet:socket()} | {error, atom()}. connect(Host, Port, Opts, Timeout) when is_integer(Port) -> gen_tcp:connect(Host, Port, - Opts ++ [binary, {active, false}, {packet, raw}], + Opts ++ [binary, {active, false}], Timeout). -spec recv(inet:socket(), non_neg_integer(), timeout()) |