diff options
Diffstat (limited to 'lib/kernel/test/socket_server.erl')
-rw-r--r-- | lib/kernel/test/socket_server.erl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/kernel/test/socket_server.erl b/lib/kernel/test/socket_server.erl index b43642131b..ea2bdc8e0d 100644 --- a/lib/kernel/test/socket_server.erl +++ b/lib/kernel/test/socket_server.erl @@ -901,13 +901,21 @@ peek_recvfrom(Sock, BufSz) -> send(#handler{socket = Sock, msg = true, type = stream}, Msg, _) -> - MsgHdr = #{iov => [Msg]}, - socket:sendmsg(Sock, MsgHdr); + CMsgHdr = #{level => ip, type => tos, data => reliability}, + CMsgHdrs = [CMsgHdr], + MsgHdr = #{iov => [Msg], ctrl => CMsgHdrs}, + %% socket:setopt(Sock, otp, debug, true), + Res = socket:sendmsg(Sock, MsgHdr), + %% socket:setopt(Sock, otp, debug, false), + Res; send(#handler{socket = Sock, type = stream}, Msg, _) -> socket:send(Sock, Msg); send(#handler{socket = Sock, msg = true, type = dgram}, Msg, Dest) -> - MsgHdr = #{addr => Dest, - iov => [Msg]}, + CMsgHdr = #{level => ip, type => tos, data => reliability}, + CMsgHdrs = [CMsgHdr], + MsgHdr = #{addr => Dest, + iov => [Msg], + ctrl => CMsgHdrs}, %% ok = socket:setopt(Sock, otp, debug, true), Res = socket:sendmsg(Sock, MsgHdr), %% ok = socket:setopt(Sock, otp, debug, false), |