<?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: TCP KEEPALIVE Query in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191257#M3716</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Martin, I dont know , why i had been trying to set keepalive in miliseconds. It turns out to be in minutes . Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2012 10:25:15 GMT</pubDate>
    <dc:creator>mohwaqas12</dc:creator>
    <dc:date>2012-12-03T10:25:15Z</dc:date>
    <item>
      <title>TCP KEEPALIVE Query</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191255#M3714</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello mqx users,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have setup a client client socket using mqx 3.7 , to transfer data to server whenever it finds something on SD Card&lt;/P&gt;&lt;P&gt;I want to use KEEPALIVE feature , to let my task know that connection has been lost/reset , if it hasn't sent anything in some time , but unfortunately KEEPALIVE does not work at all.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Algorithm is like this :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Create a Socket&lt;/LI&gt;&lt;LI&gt;Set KEEPALIVE Socket option // KEEP ALIVE is set to 5000 i.e 5 seconds&lt;/LI&gt;&lt;LI&gt;Call Connect&amp;nbsp; // to connect to server&lt;/LI&gt;&lt;LI&gt;Loop Until some error occurs on socket&lt;UL&gt;&lt;LI&gt;Send some data // send data only if present&lt;/LI&gt;&lt;LI&gt;Time Delay (5000) // put task to sleep for 5 Seconds using _time_delay(5000);\&lt;/LI&gt;&lt;LI&gt;Check Socket State // using ioctl&amp;nbsp; OPT_SOCKET_ERROR&lt;/LI&gt;&lt;LI&gt;Break out of loop ( if error occurs and keep connecting until socket is connected )&lt;/LI&gt;&lt;/UL&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I run this task and the socket connects to server , but it does not send KEEPALIVE Probes , i am capturing packets on wireshark and i only see connection establishment packets not the keep alive .&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have some queries :&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Does KEEPALIVE works when we use active sockets?&lt;/LI&gt;&lt;LI&gt;Does KEEPALIVE has some specific requirements in mqx to make it work, like minimum time after which keepalive probes are sent.&lt;/LI&gt;&lt;LI&gt;Does polling socket state using ioctl OPT_SOCKET_ERROR works?. i e Does it returns state if it detects some error . like Shutdown from server, connection lost etc.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please correct me , i might be missing some important steps to make socket options work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 06:47:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191255#M3714</guid>
      <dc:creator>mohwaqas12</dc:creator>
      <dc:date>2012-11-29T06:47:45Z</dc:date>
    </item>
    <item>
      <title>Re: TCP KEEPALIVE Query</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191256#M3715</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;keepalive time seems to be in minutes, not miliseconds.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Nov 2012 12:05:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191256#M3715</guid>
      <dc:creator>Martin_</dc:creator>
      <dc:date>2012-11-29T12:05:27Z</dc:date>
    </item>
    <item>
      <title>Re: TCP KEEPALIVE Query</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191257#M3716</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Martin, I dont know , why i had been trying to set keepalive in miliseconds. It turns out to be in minutes . Thank you &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 10:25:15 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/TCP-KEEPALIVE-Query/m-p/191257#M3716</guid>
      <dc:creator>mohwaqas12</dc:creator>
      <dc:date>2012-12-03T10:25:15Z</dc:date>
    </item>
  </channel>
</rss>

