diff options
author | Roger Lipscombe <[email protected]> | 2015-09-07 19:53:43 +0100 |
---|---|---|
committer | Roger Lipscombe <[email protected]> | 2015-10-02 07:52:14 +0100 |
commit | b02221cf90bf7021b382e4bdfb61b08cccc2c99d (patch) | |
tree | 08a32f5e2fd0ed4d24cac13b5fb8342abfc14f57 /lib/orber | |
parent | 61828f77ca2542109ece006d730a4f8fe3300616 (diff) | |
download | otp-b02221cf90bf7021b382e4bdfb61b08cccc2c99d.tar.gz otp-b02221cf90bf7021b382e4bdfb61b08cccc2c99d.tar.bz2 otp-b02221cf90bf7021b382e4bdfb61b08cccc2c99d.zip |
Pass 'raw' options through
In Erlang R16B03-1, I've been passing raw options to ssl:listen as
follows, and it's been working fine:
% The constants are defined elsewhere.
LOpts = [{raw, ?IPPROTO_TCP, ?TCP_MAXSEG, <<MSS:32/native>>} | ...],
{ok, LSocket} = ssl:listen(0, LOpts)
In Erlang 17.3, this fails with
{option_not_a_key_value_tuple,{raw,6,2,<<64,2,0,0>>}}
I originally reported this in
http://erlang.org/pipermail/erlang-questions/2014-October/081226.html
I need to pass this particular raw option to ssl:listen, because it
needs to be applied when the socket is first opened -- between inet:open
and prim_inet:listen -- it cannot be applied later by setopts. This
means that it needs to be done by inet_tcp:listen/2 -- well, actually by
inet:open/8, but...
Otherwise it's racey -- a client could connect between prim_inet:listen
and the setopts call. The MSS option is advertised in the SYN,ACK
packet, and can't be changed later.
Diffstat (limited to 'lib/orber')
0 files changed, 0 insertions, 0 deletions