<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>On Mar 31, 2013, at 6:09 PM, Todong Ma &lt;<a href="mailto:gbstack08@gmail.com">gbstack08@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_extra" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I wrote a simple client and server to get system information (e.g. cpu, memory, etc.)<br></div><div class="gmail_extra" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Client send 'cpu' to the server, then server will return cpu's information to client.<br><br></div><div class="gmail_extra" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Now client send multiple commands to server one time, e.g. cpu, memory, database, hard disk. But sometimes server couldn't receive some type information (e.g. cpu, database), and the missed information type is not fixed every time.<br><br></div><div class="gmail_extra" style="font-family: Menlo-Regular; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">So I want client to check whether ITransport.write() sends message to server successfully. If failed, client will resend the message to server.<br></div></blockquote></div><br><div>It's a good thing that write() doesn't convey information about send() succeeding so you can't trust it :). &nbsp;You can't rely on send() succeeding to convey this information: send() can succeed but all that means is that data moved from your application into your kernel.</div><div><br></div><div>What you want to do is to have an application-level acknowledgement of the data that was sent.</div><div><br></div><div>AMP will provide this for you automatically; when the Deferred returned by callRemote fires, the other end has received and acknowledged the information.</div><div><br></div><div>-glyph</div><div><br></div></body></html>