Add _OS\getsockopt_int() and _OS\setsockopt_int()
commit58376ad3072f5516e50ea93cbd7db49d14084a78
authorFred Emmott <fe@fb.com>
Sat, 9 May 2020 12:58:04 +0000 (9 05:58 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 9 May 2020 13:00:33 +0000 (9 06:00 -0700)
tree548fb30495bf7fde65d3453808cd286517750096
parente60776e667ccf5109a92c40844b271baecd19b8b
Add _OS\getsockopt_int() and _OS\setsockopt_int()

Summary:
May add separate function for SO_LINGER in the future (which doesn't take an int), and there's
also some non-portable flags too which I've not currently implemented.

Likely to rework fcntl to a similar pattern after this.

Unblocks Unix/TCP -> HSL FileDescriptors: getsockopt($fd, SOL_SOCKET, SO_ERROR) is required.

Reviewed By: alexeyt, jjergus

Differential Revision: D21334817

fbshipit-source-id: 6f03604df73ec0e2f25cfefba054f0f1c5131483
hphp/hack/hhi/hsl/ext_hsl_os_private.hhi
hphp/runtime/ext/hsl/ext_hsl_os.cpp
hphp/runtime/ext/hsl/ext_hsl_os.php
hphp/test/slow/ext_hsl/sockopt.php [new file with mode: 0644]
hphp/test/slow/ext_hsl/sockopt.php.expectf [new file with mode: 0644]