xiaoxiang781216 commented on code in PR #7083: URL: https://github.com/apache/incubator-nuttx/pull/7083#discussion_r969503102
########## net/socket/getsockopt.c: ########## @@ -337,50 +337,51 @@ int psock_getsockopt(FAR struct socket *psock, int level, int option, return -EBADF; } - /* Handle retrieval of the socket option according to the level at which - * option should be applied. - */ +#ifdef CONFIG_NET_USRSOCK + /* Try usrsock further if the protocol not available */ - switch (level) + if (psock->s_type == SOCK_USRSOCK_TYPE) { - case SOL_SOCKET: /* Socket-level options (see include/sys/socket.h) */ - ret = psock_socketlevel_option(psock, option, value, value_len); - break; + ret = usrsock_getsockopt(psock->s_conn, level, + option, value, value_len); + } + else Review Comment: No, usrsock is async(non blocking) in the low level which mean SO_RCVTIMEO and SO_SNDTIMEO need be handled in upper level at least. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org