wasm-micro-runtime icon indicating copy to clipboard operation
wasm-micro-runtime copied to clipboard

lib-socket does not support getsockopt(SOL_SOCKET, SO_ERROR)

Open srberard opened this issue 5 months ago • 0 comments

WAMR's socket support provides an implementation for getsockopt. However, when called with SOL_SOCKET, SO_ERROR it fails with __WASI_ERRNO_NOTSUP which causes some existing code to fail. There is support for handling many of the SOL_SOCKET options and having platform specific implementations (e.g., SO_RCVBUF). I'd propose to do the same for SO_ERROR.

For reference, SO_ERROR is used on getsockopt to return any pending errors on the socket and clears the error status value. Zero is returned if there are no errors.

srberard avatar Aug 13 '25 10:08 srberard