xiaoxiang781216 commented on code in PR #22441:
URL: https://github.com/apache/nuttx/pull/22441#discussion_r4729562214
##########
net/tcp/tcp_getsockopt.c:
##########
@@ -213,9 +216,12 @@ int tcp_getsockopt(FAR struct socket *psock, int option,
{
FAR int *nodelay = (FAR int *)value;
- /* Always true here since we do not support Nagle. */
+ /* TCP_NODELAY is always on (no Nagle algorithm). TCP_CORK is
+ * only a hint: report what setsockopt() stored.
+ */
- *nodelay = option == TCP_NODELAY ? 1 : 0;
+ *nodelay = option == TCP_NODELAY ? 1 :
+ _SO_GETOPT(conn->sconn.s_options, option);
Review Comment:
how about init s_options with TCP_NODELAY
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]