#209 - Add generic socket setsockopt API#211
Conversation
Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
f46d041 to
ac5d0be
Compare
|
| Filename | Overview |
|---|---|
| src/engines/socket/daqiri_socket_engine.cpp | Implements socket_setsockopt with RoCE guard, null-optval validation, shared_ptr lookup under mutex, and ::setsockopt passthrough. Also introduces apply_socket_int_option helper that consolidates repeated int-valued setup calls. |
| python/daqiri_common_pybind.cpp | Python shim correctly dispatches bool, int, str, bytes, and buffer-protocol objects, each releasing the GIL before the C call. Bool check precedes int check correctly; buffer path destruction order is safe. |
| include/daqiri/common.h | Adds socket_setsockopt to the public free-function API; signature matches vtable and follows existing socket helper conventions. |
| src/engine.h | Virtual method added to Engine base class; default implementation returns NOT_SUPPORTED, so non-socket engines degrade gracefully. |
| src/common.cpp | Thin forwarding function follows established pattern: guards with ASSERT_DAQIRI_ENGINE_INITIALIZED(), dispatches through g_daqiri_engine vtable. |
| src/engine.cpp | Default socket_setsockopt logs CRITICAL and returns NOT_SUPPORTED, matching the style of other unimplemented socket helpers. |
| src/engines/socket/daqiri_socket_engine.h | Declares socket_setsockopt override and the private apply_socket_int_option helper; consistent with the implementation file. |
Reviews (2): Last reviewed commit: "#209 - Address Greptile socket API feedb..." | Re-trigger Greptile
Signed-off-by: Cliff Burdick <cburdick@nvidia.com>
For users wanting to customize the socket options for
stream_type: socket, add an API to allow them to do so. Pass through the options to Linux.