YT
rawвыглядеть
{raw,
Protocol :: integer() >= 0,
OptionNum :: integer() >= 0,
ValueSpec ::
(ValueSize :: integer() >= 0) | (ValueBin :: binary())}
Size: a a a
YT
rawвыглядеть
{raw,
Protocol :: integer() >= 0,
OptionNum :: integer() >= 0,
ValueSpec ::
(ValueSize :: integer() >= 0) | (ValueBin :: binary())}
YT
LW
LW
LW
c🦊
LW
c🦊
СИ
LW
YT
1> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.5>}
2> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.6>}
3> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.7>}
LW
1> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.5>}
2> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.6>}
3> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.7>}
LW
YT
so_reuseport =
case :os.type() do
{:unix, :linux} -> {:raw, 1, 15, <<1::32-native>>}
{:unix, :darwin} -> {:raw, 0xffff, 0x0200, <<1::32-native>>}
end
YT
LW
1> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.5>}
2> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.6>}
3> gen_tcp:listen(8110, [{raw, 65535, 512, <<1:32/native>>}]).
{ok,#Port<0.7>}
LW
YT
YT
LW