<div dir="ltr"><br><div class="gmail_extra">I wrote a simple client and server to get system information (e.g. cpu, memory, etc.)<br></div><div class="gmail_extra">Client send 'cpu' to the server, then server will return cpu's information to client.<br>
<br></div><div class="gmail_extra">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">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><div class="gmail_extra"><br><div class="gmail_quote">
On Sun, Mar 31, 2013 at 5:49 PM, Glyph <span dir="ltr"><<a href="mailto:glyph@twistedmatrix.com" target="_blank">glyph@twistedmatrix.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Mar 31, 2013, at 1:50 AM, Todong Ma <<a href="mailto:gbstack08@gmail.com">gbstack08@gmail.com</a>> wrote:<br>
<br>
> Hi, everyone<br>
><br>
> How could I dertermine ITransport.write() succeed?<br>
> In windows socket API, I can check send()'s return value to dertermine whether send() succeed.<br>
><br>
> Any suggestion is appreciated.<br>
<br>
</div></div>ITransport.write() always succeeds. It may or may not call socket.send immediately, so it cannot tell you if the socket.send() succeeded or not.<br>
<br>
What are you trying to do?<br>
<br>
-glyph<br>
<br>
<br>
_______________________________________________<br>
Twisted-Python mailing list<br>
<a href="mailto:Twisted-Python@twistedmatrix.com">Twisted-Python@twistedmatrix.com</a><br>
<a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python" target="_blank">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>
</blockquote></div><br></div></div>