<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Socket buffer's size in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159884#M1146</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked if your memory overflows ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 08 May 2012 21:19:12 GMT</pubDate>
    <dc:creator>Weining</dc:creator>
    <dc:date>2012-05-08T21:19:12Z</dc:date>
    <item>
      <title>Socket buffer's size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159882#M1144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to increase the&amp;nbsp;socket buffer's size with sectopt() function for a TCP server application&lt;/P&gt;&lt;P&gt;The issue is if the size is greater than 512, when I try to connect, no error is done but the accept() function is always waiting.&lt;/P&gt;&lt;P&gt;Otherwise, with size &amp;lt;= 512 is OK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Some additional information:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;- RTCS was built with RTCS_MINIMUM_FOOTPRINT&amp;nbsp; (default)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Other parameters:&lt;/P&gt;&lt;P&gt;_RTCSPCB_init&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 3; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_RTCS_msgpool_init&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 3; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;_RTCS_socket_part_init = 3;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any idea?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2012 17:56:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159882#M1144</guid>
      <dc:creator>oscar</dc:creator>
      <dc:date>2012-05-04T17:56:00Z</dc:date>
    </item>
    <item>
      <title>Re: Socket buffer's size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159883#M1145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I think you have it wrong. The fact that it sticks inside the accept is a good thing. If it gets out it means that an error occurred or the node on the other side has cancelled the session.&lt;/P&gt;&lt;P&gt;here's how I work it.&lt;/P&gt;&lt;P&gt;I recycle two handles because my host connection will occasionaly close the session and re-open another.&lt;/P&gt;&lt;P&gt;I am also making sure that the ip address of the node always remains the same as the original connection to prevent someone taking over the session.&lt;/P&gt;&lt;PRE&gt;  while(socket_flag == TRUE)    {    sock2 = accept(listensock, &amp;amp;raddr, &amp;amp;addr_length);    return_error_if(sock2 == RTCS_SOCKET_ERROR);    if(addr.sin_addr.s_addr == raddr.sin_addr.s_addr)    {     shutdown(sock, FLAG_CLOSE_TX);     fclose(sockfd);     sockfd = fopen("socket:", (char_ptr)sock2);     socket_flag = TRUE;    }    else    {     diag_led_red();     RTCS_time_delay(100);     continue;    }    sock = accept(listensock, &amp;amp;addr, &amp;amp;addr_length);    return_error_if(sock == RTCS_SOCKET_ERROR);    if(addr.sin_addr.s_addr == raddr.sin_addr.s_addr)    {     shutdown(sock2, FLAG_CLOSE_TX);     fclose(sockfd);     sockfd = fopen("socket:", (char_ptr)sock);     socket_flag = TRUE;    }    else    {     diag_led_grn();     RTCS_time_delay(100);     continue;    }           }//while(socket_flag == TRUE)    &lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:05:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159883#M1145</guid>
      <dc:creator>drummer</dc:creator>
      <dc:date>2020-10-29T09:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: Socket buffer's size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159884#M1146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you checked if your memory overflows ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 May 2012 21:19:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Socket-buffer-s-size/m-p/159884#M1146</guid>
      <dc:creator>Weining</dc:creator>
      <dc:date>2012-05-08T21:19:12Z</dc:date>
    </item>
  </channel>
</rss>

