Open pavelsavara opened 1 month ago
cc: @badeend, @dicej
I think wasi-libc can implement it like:
return if state == TCP_SOCKET_STATE_CONNECTED && input_pollable.ready() { 8192 } else { 0 };
Some additional info: https://github.com/WebAssembly/wasi-sockets/issues/17
https://github.com/WebAssembly/wasi-libc/blob/7d4d3b83fc66c79b3faa5989e67ed2d1042dacaf/libc-bottom-half/cloudlibc/src/libc/sys/ioctl/ioctl.c#L22-L37