You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2021/07/16 09:30:26 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #4080: net/socket: add SO_SNDBUF support

xiaoxiang781216 commented on a change in pull request #4080:
URL: https://github.com/apache/incubator-nuttx/pull/4080#discussion_r671102618



##########
File path: net/udp/udp_sendto_buffered.c
##########
@@ -657,6 +671,23 @@ ssize_t psock_udp_sendto(FAR struct socket *psock, FAR const void *buf,
     {
       net_lock();
 
+#if CONFIG_NET_SEND_BUFSIZE > 0
+      /* If the send buffer size exceeds the send limit,
+       * wait for the write buffer to be released
+       */
+
+      while (udp_inqueue_wrb_size(conn) >= conn->sndbufs)

Review comment:
       add + len

##########
File path: net/tcp/tcp_send_buffered.c
##########
@@ -1098,6 +1122,23 @@ ssize_t psock_tcp_send(FAR struct socket *psock, FAR const void *buf,
       psock->s_sndcb->priv  = (FAR void *)psock;
       psock->s_sndcb->event = psock_send_eventhandler;
 
+#if CONFIG_NET_SEND_BUFSIZE > 0
+      /* If the send buffer size exceeds the send limit,
+       * wait for the write buffer to be released
+       */
+
+      while (tcp_inqueue_wrb_size(conn) >= conn->snd_bufs)

Review comment:
       + len




-- 
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-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org