<?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: Why is RTCS_accept(0) returning socket of HTTP Server in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361023#M11828</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Martin. That's fine. I was concerned that I didn't understand things fully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: The RTCS guide Rev 16 uses RTCS_selectall(0) in the example at the end of the socket section. I just copied it from the PDF and modified to my needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a suggestion it might be nice to see a socket's owner task in the RTCS TAD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 13 Sep 2014 17:25:38 GMT</pubDate>
    <dc:creator>razed11</dc:creator>
    <dc:date>2014-09-13T17:25:38Z</dc:date>
    <item>
      <title>Why is RTCS_accept(0) returning socket of HTTP Server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361020#M11825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using MQX 4.1.1, K64, IAR.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a task that calls HTTPSRV_init() and later creates a TCP listening socket per the example code on port 17 for quote-of-the-day. If I have the demo webpages loaded in a browser that is periodically calling the CGI for time I noticed that RTCS_selectall(0) returns the socket ID for my HTTP server.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation suggests that the RTCS_selectall(0) will return a listening stream for any sockets that the task owns.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But the HTTP server is a different task so why is this happening? Also is there a way within the RTCS TAD to see the ID of the task that owns the socket? I didn't see this but it seems like it would useful in this case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edit: I have since made my socket code a separate task that is launched by the same task that called HTTPSRV_init() and RTCS_select(0) is still returning during HTTP requests.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Sep 2014 23:28:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361020#M11825</guid>
      <dc:creator>razed11</dc:creator>
      <dc:date>2014-09-11T23:28:22Z</dc:date>
    </item>
    <item>
      <title>Re: Why is RTCS_accept(0) returning socket of HTTP Server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361021#M11826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've solved my problem by using RTCS_selectset with the single listening socket. I'd still like to understand what is happening with selectall() and the relationship between sockets and the tasks that own them.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would detach/attach been a better option?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kenny&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 00:42:31 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361021#M11826</guid>
      <dc:creator>razed11</dc:creator>
      <dc:date>2014-09-13T00:42:31Z</dc:date>
    </item>
    <item>
      <title>Re: Why is RTCS_accept(0) returning socket of HTTP Server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361022#M11827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;We have not used RTCS_selectall() in any application/demo code, so it can be seen as not tested. It is possible MQX 4.1 has a bug in this function. RTCS_selectset() shall be used instead. In MQX for Kinetis SDK we have already introduced the new BSD-like select() function, with standard interface using FD_SET/FD_CLR/FD_ZERO/FD_ISSET interface. This is the recommended API for new applications. RTCS_selectall/RTCS_selectset have been re-implemented with the select() function, so RTCS_selectall() can be used again, starting with MQX for Kinetis SDK.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Martin&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 07:12:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361022#M11827</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2014-09-13T07:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is RTCS_accept(0) returning socket of HTTP Server</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361023#M11828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Martin. That's fine. I was concerned that I didn't understand things fully.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;FYI: The RTCS guide Rev 16 uses RTCS_selectall(0) in the example at the end of the socket section. I just copied it from the PDF and modified to my needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a suggestion it might be nice to see a socket's owner task in the RTCS TAD.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 13 Sep 2014 17:25:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Why-is-RTCS-accept-0-returning-socket-of-HTTP-Server/m-p/361023#M11828</guid>
      <dc:creator>razed11</dc:creator>
      <dc:date>2014-09-13T17:25:38Z</dc:date>
    </item>
  </channel>
</rss>

