<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>tcp sendmsg() EAGAIN handling</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/129124/tcp-sendmsg-eagain-handling</link><description>we have a &amp;#39;long lived&amp;#39; tcp connection w/ regular data sends (1hz of 256 bytes for mqtt publishes) where sendmsg() sometimes returns EAGAIN. when trying again it usually works but sometimes we get the poll() read event and this indicates that the peer</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 15 Sep 2026 13:00:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/129124/tcp-sendmsg-eagain-handling" /><item><title>RE: tcp sendmsg() EAGAIN handling</title><link>https://devzone.nordicsemi.com/thread/571235?ContentTypeID=1</link><pubDate>Tue, 15 Sep 2026 13:00:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f56f0a60-3a4b-42d1-8122-45a26ba607f2</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hello again!&lt;br /&gt;&lt;br /&gt;Thanks for the details. Can you verify that you are retransmitting the exact same data when retrying? There is a strict requirement for TLS connections that retries contains the same data. The EAGAIN error indicates that this may not be the case.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;The requirement is &lt;a href="https://nrfconnectdocs.nordicsemi.com/ncs/latest/zephyr/services/connectivity/networking/api/sockets.html#secure-socket-creation"&gt;documented here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: tcp sendmsg() EAGAIN handling</title><link>https://devzone.nordicsemi.com/thread/571202?ContentTypeID=1</link><pubDate>Mon, 14 Sep 2026 14:18:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e77f1556-1cbb-4029-bd87-3afc28acf8b5</guid><dc:creator>dpf</dc:creator><description>&lt;p&gt;&amp;gt;&lt;span&gt;Could you give me some more details about your implementation? Specifically: your nRF Connect SDK version, your modem firmware version and whether you are using TLS or not.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;we&amp;#39;re using tls + v2.0.0.4 on the nrf9151-laca, and getting to sendmsg() via the zephy&amp;#39;rs offload.&lt;br /&gt;&lt;br /&gt;&lt;span&gt;&amp;gt;Also, can you explain how you handle the retries in the application? If you don&amp;#39;t want to share implementation data we can make the ticket private.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;basically we try twice like:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;for (tries = 0; tries &amp;lt; 2; tries++) {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;rv = sendmsg((s, msg, flags);&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if (rv &amp;lt; 0) {&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;if (errno == EAGAIN &amp;amp;&amp;amp; tries &amp;lt; 1)&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;continue&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;return -errno;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;span&gt;... udate message iovec ..&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;}&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: tcp sendmsg() EAGAIN handling</title><link>https://devzone.nordicsemi.com/thread/571084?ContentTypeID=1</link><pubDate>Thu, 10 Sep 2026 08:29:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2d1373e4-183e-46a4-a70e-11464e313607</guid><dc:creator>Carl Richard</dc:creator><description>&lt;p&gt;Hi dpf!&lt;br /&gt;&lt;br /&gt;Thanks for reaching out. &lt;br /&gt;&lt;br /&gt;Could you give me some more details about your implementation? Specifically: your nRF Connect SDK version, your modem firmware version and whether you are using TLS or not.&lt;br /&gt;&lt;br /&gt;Also, can you explain how you handle the retries in the application? If you don&amp;#39;t want to share implementation data we can make the ticket private.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Carl Richard&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>