feat(libwebrtc): implement the rtc::SocketAddress port, ipaddr, IsAnyIP, IsComplete and IsNil accessors #15261
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/15261"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by alvaroelpob on 2026-11-02T22:34:58Z.
What
Implements the
rtc::SocketAddressconst accessorsport(),ipaddr(),IsAnyIP(),IsComplete()andIsNil()in libwebrtc, which threw and were declared without parameters.The module's WebRTC revision lies between M127 and M134, as recorded in the debt file. The five accessors in
socket_address.cc(M127, M134) andIPIsAnyinip_address.ccare the same at both.socket_address.hdiffers only in a unit-test-onlyoperator<<.src/SocketAddress.cppstarts with that file's WebRTC notice and the BSD licence.WebRtcSocketAddressis the 88-byte layout:hostname_at 0: the guest's 40-bytestd::stringthatGuestLocale.hppmeasured on the console (characters inline up to a capacity of 15, on the heap above), added asinclude/GuestString.hpp;IPAddressonmainat 40;port_at 72,scope_id_at 76 andliteral_at 80.Behaviour:
portreturnsport_, andipaddrreturns a pointer toip_, as theconst IPAddress&it is.IsAnyIPmatches 0.0.0.0,::and::ffff:0.0.0.0.IsCompleteis "not any, and a nonzero port".IsNilis "empty hostname, unspecified family and port 0".A null address throws. It removes 5 exports from the inventory.
Tested
Ubuntu 26.04 (WSL2, kernel 6.18), GCC 15.2.0, Release, full build with
BUILD_TESTING=ON.guest_webrtc_socket_addresstest:::,::ffff:0.0.0.0,::1, and a half-written mapped prefix that is not "any".ipaddrreturns the embedded address, and a null address throws.ctest -j16on head 83d05eadce: 3596/3596 pass.check_conventions.py --base upstream/mainpasses.pr_overlap.py: no open pull request implements these functions. The shared lines are the pending-export count indocs/dev/debt/libwebrtc.mdand the source, test and declaration lists inCMakeLists.txtandApi.hpp.main4f41f4c375, head f05c14ceca, to resolve the conflicts on the sharedCMakeLists.txt,Export.cppand debt-file lines; both sides are kept and the debt count is recomputed fromExport.cpp. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfailed under that load, pass when run alone, andmain4f41f4c375passes all 3799 with-j16on the same machine.check_conventions.py --base upstream/mainpasses.Derived fromlines forsocket_address.ccandip_address.cc. Full build andctest -j16: 3796/3800 pass;guest_sce_net,guest_poll,guest_select_waitandguest_memoryfail only when the suite runs as a background job here, and pass when run in the foreground on this head and onmain.check_conventions.py --base upstream/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)