<?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 Automatic socket close? in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194677#M4006</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using CW 10.2, MWX 3.8.1 and Kinetis MK60DN512.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know if the task destruction close automatically the socket opened by the task itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task1---------&lt;/P&gt;&lt;P&gt;s1 = socket( ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;err = bind( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;err = listen( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;s2 = accept( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;shutdown( s2, FLAG_ABORT_CONNECTION );&lt;/P&gt;&lt;P&gt;shutdown( s1, FLAG_ABORT_CONNECTION );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task2---------&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;_task_destroy( Task1_id );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the task 2 calls the _task_destroy function when the task 1 is executing one instruction between the socket creation (s1 = socket( ... );) and the first socket close (shutdown( ... );), are the two sockets closed automatically or must they be closed manually before or after the _task_destroy function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 30 Nov 2012 13:01:17 GMT</pubDate>
    <dc:creator>Teckna</dc:creator>
    <dc:date>2012-11-30T13:01:17Z</dc:date>
    <item>
      <title>Automatic socket close?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194677#M4006</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using CW 10.2, MWX 3.8.1 and Kinetis MK60DN512.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd like to know if the task destruction close automatically the socket opened by the task itself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task1---------&lt;/P&gt;&lt;P&gt;s1 = socket( ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;err = bind( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;err = listen( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;s2 = accept( s1, ... );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;shutdown( s2, FLAG_ABORT_CONNECTION );&lt;/P&gt;&lt;P&gt;shutdown( s1, FLAG_ABORT_CONNECTION );&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Task2---------&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;_task_destroy( Task1_id );&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the task 2 calls the _task_destroy function when the task 1 is executing one instruction between the socket creation (s1 = socket( ... );) and the first socket close (shutdown( ... );), are the two sockets closed automatically or must they be closed manually before or after the _task_destroy function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Many thanks&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Nov 2012 13:01:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194677#M4006</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-11-30T13:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic socket close?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194678#M4007</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: .0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt;Hi Teckna,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt;The opened sockets must be closed manually before the task destroying.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt;Best regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 0.0001pt;"&gt;&lt;SPAN style="font-size: 11pt; font-family: Arial, sans-serif;"&gt;Andrey Butok&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 08:30:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194678#M4007</guid>
      <dc:creator>butok</dc:creator>
      <dc:date>2012-12-03T08:30:11Z</dc:date>
    </item>
    <item>
      <title>Re: Automatic socket close?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194679#M4008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Many thanks, Andrey,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Teckna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 13:13:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Automatic-socket-close/m-p/194679#M4008</guid>
      <dc:creator>Teckna</dc:creator>
      <dc:date>2012-12-03T13:13:48Z</dc:date>
    </item>
  </channel>
</rss>

