<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - RSocket::Send() question - Comments</title>
 <link>http://www.newlc.com/topic-17040</link>
 <description>Comments for &quot;RSocket::Send() question&quot;</description>
 <language>en</language>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-46241</link>
 <description>&lt;p&gt;what&#039;s the method to overcome this problem?&lt;br /&gt;
How to garantee that the pckg is received by the remote host?&lt;/p&gt;</description>
 <pubDate>Thu, 08 May 2008 05:48:46 +0200</pubDate>
 <dc:creator>smallarmy</dc:creator>
 <guid isPermaLink="false">comment 46241 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-36317</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;What I&amp;#039;m actually doing is to call the asynchronous RSocket::Write() to send some data to the remote host and I want to know if every single TCP packet, i.e. the complete data have been received by the remote TCP/IP stack.&lt;br /&gt;So if Write() completes when the last packet is received &amp;amp; acknowledged by the remote TCP/IP stack then it makes me happy.&lt;br /&gt;Else if there is no such guarantee I have to implement some kind of acknowledgment mechanism in the application layer to avoid cases where Write() may have complete with KErrNone but not all of the packets have been yet received by the remote host (e.g. connection breaks right after).&lt;br /&gt;Also, my protocol is message-exchange based and not a request-reply. So, after a host sends a message to another it doesn&amp;#039;t wait for a reply, it just wants to know if it eventually received the whole message. So I cannot use the Shutdown() method.&lt;br /&gt;I know that TCP/IP is a reliable protocol but is this reliability transfered to the application level?&lt;br /&gt;&lt;br /&gt;Thanks a lot,&lt;br /&gt;George&lt;/div&gt;</description>
 <pubDate>Fri, 15 Dec 2006 15:29:27 +0100</pubDate>
 <dc:creator>giaslas</dc:creator>
 <guid isPermaLink="false">comment 36317 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-36316</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: msa2&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;&lt;b&gt;TSockXfrLength&lt;/b&gt; just tells how much data from your send was actually accepted into the protocol buffers (at this point I don&amp;#039;t know exactly the situation when XfrLenth would be different from the length of aDesC8).&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;Are you sure? Would that mean that documentation is not correct?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class=&quot;quoteheader&quot;&gt;Quote from: RSocket Documentation&lt;/div&gt;&lt;div class=&quot;quote&quot;&gt;The TSockXfrLength argument will return the amount of data actually sent.&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Wed, 13 Dec 2006 02:57:37 +0100</pubDate>
 <dc:creator>sysctl-forum</dc:creator>
 <guid isPermaLink="false">comment 36316 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-36315</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;After digging deeper into this, I must revise my previous answer: unfortunately you cannot use &lt;b&gt;Shutdown ENormal/EStopOutput&lt;/b&gt; to wait until all data has been sent. Both complete the request without waiting for the send buffers to become empty.&lt;br /&gt;&lt;br /&gt;There is actually obscure ioctl that is supposed to do exactly that:&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;socket.Ioctl(KIoctlTcpNotifyDataSent, iStatus, NULL, KSolInetTcp);&lt;br /&gt;&lt;/div&gt;When issued, it should complete when TCP send buffers become empty (of course this may not happen, if you keep filling the buffers with Send/Write at same time).&lt;br /&gt;&lt;br /&gt;My advise for using &lt;b&gt;Shutdown EImmediate&lt;/b&gt; for any stuck sockets still stands.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TSockXfrLength&lt;/b&gt; just tells how much data from your send was actually accepted into the protocol buffers (at this point I don&amp;#039;t know exactly the situation when XfrLenth would be different from the length of aDesC8).&lt;br /&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 12 Dec 2006 19:09:01 +0100</pubDate>
 <dc:creator>msa2</dc:creator>
 <guid isPermaLink="false">comment 36315 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-36314</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;As far as I can understand, you can use an overload of Send() to know how much data was sent (last argument).&lt;br /&gt;&lt;div class=&quot;codeheader&quot;&gt;Code:&lt;/div&gt;&lt;div class=&quot;code&quot;&gt;IMPORT_C void Send(const TDesC8 &amp;amp;aDesc, TUint someFlags, TRequestStatus &amp;amp;aStatus, TSockXfrLength &amp;amp;aLen);&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;</description>
 <pubDate>Tue, 12 Dec 2006 13:31:45 +0100</pubDate>
 <dc:creator>sysctl-forum</dc:creator>
 <guid isPermaLink="false">comment 36314 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040#comment-36313</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;The correct answer is (a).&lt;br /&gt;&lt;br /&gt;Which means, the when you close the TCP socket, it will still stay around and try to transfer the unsent data (if any left). Application writer has be aware that&lt;br /&gt;&lt;br /&gt;- with simple &amp;quot;Open - send data - Close&amp;quot; application cannot be 100% certain that all data was eventually transmitted. For that, you always need some application level protocol that acknowledges the receipt of file.&lt;br /&gt;&lt;br /&gt;- some information can be got by doing Shutdown (ENormal or EStopOutput) before the Close. The OK completion at least signals that all data has been received by remote TCP protocol engine.&lt;br /&gt;&lt;br /&gt;- if your protocol is like HTTP: send request and wait for reply, and the reply does not come. In such case, &lt;b&gt;ALWAYS USE Shutdown EImmediate&lt;/b&gt; before closing. Otherwise the TCP machinery will potentially attempt deliver the request and orderly shutdown for several minutes!&lt;/div&gt;</description>
 <pubDate>Mon, 11 Dec 2006 17:53:40 +0100</pubDate>
 <dc:creator>msa2</dc:creator>
 <guid isPermaLink="false">comment 36313 at http://www.newlc.com</guid>
</item>
<item>
 <title>RSocket::Send() question</title>
 <link>http://www.newlc.com/topic-17040</link>
 <description>&lt;div class=&quot;smf-content&quot;&gt;&lt;/div&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/topic-17040&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/topic-17040#comments</comments>
 <category domain="http://www.newlc.com/forums/internet">Internet and Network access</category>
 <pubDate>Mon, 11 Dec 2006 11:46:40 +0100</pubDate>
 <dc:creator>giaslas</dc:creator>
 <guid isPermaLink="false">16604 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
