Re: [Pixil-devel] ask for help

[email protected] Wed, 8 Feb 2006 10:01:52 +0800
Newsgroups gmane.comp.web.viewml.devel
Message-ID <OFDC59574A.160413C1-ON4825710F.000AA6CA-4825710F.000B7D1C@skyworksinc.com>
This is a multipart message in MIME format.
--===============0336484880==
Content-Type: multipart/alternative;
	boundary="=_alternative 000B7D174825710F_="

This is a multipart message in MIME format.
--=_alternative 000B7D174825710F_=
Content-Type: text/plain; charset="US-ASCII"

hi all,
    i guest the side effect of   wirte(sock, 0, 0)  is to make this sock 
readable, so than when some packet queued, it make the 
sock readable, so when client use select(...) call, it will return 
immedialely, not blocked forever if no new packet in, and 
have chance to get packet queued, if it right? anybody can give me some 
comment? thanks in advacnce

best regards
tao





[email protected] 
Sent by: [email protected]
01/24/2006 05:47 PM

To
[email protected]
cc

Subject
[Pixil-devel] ask for help







Hello, 

   my name is tao and I am application engineer in skyworks china, i have 
download the pixil-1.2.3 and read its code, 
there are one thing confuse me in function client_WaitForServer(...) in 
client.c, 
    during wait for special type message,it will queue all other type 
message, after successly receive the specail 
type message, it will do write zero length data into sock if queued other 
type message, 

        write(sock, 0, 0); 

i don't understant the the effect of this write operation, i will 
appreciate any comments, 

static int 
client_WaitForServer(int sock, int packet_type, pkt_buff_t **pkt, int 
timeout)     
{ 
    do{ 
         ... 
          if(qcount) 
                write(sock,0,0); 
           return (0); 
         ... 
     } 
} 



thanks you very much, in advance! 

regards 
tao_______________________________________________
Pixil-devel mailing list
[email protected]
http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel


--=_alternative 000B7D174825710F_=
Content-Type: text/html; charset="US-ASCII"


<br><font size=2 face="sans-serif">hi all,</font>
<br><font size=2 face="sans-serif">&nbsp; &nbsp; i guest the side effect
of &nbsp; wirte(sock, 0, 0) &nbsp;is to make this sock readable, so than
when some packet queued, it make the </font>
<br><font size=2 face="sans-serif">sock readable, so when client use select(...)
call, it will return immedialely, not blocked forever if no new packet
in, and </font>
<br><font size=2 face="sans-serif">have chance to get packet queued, if
it right? anybody can give me some comment? thanks in advacnce</font>
<br>
<br><font size=2 face="sans-serif">best regards</font>
<br><font size=2 face="sans-serif">tao</font>
<br>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td width=40%><font size=1 face="sans-serif"><b>[email protected]</b>
</font>
<br><font size=1 face="sans-serif">Sent by: [email protected]</font>
<p><font size=1 face="sans-serif">01/24/2006 05:47 PM</font>
<td width=59%>
<table width=100%>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">To</font></div>
<td><font size=1 face="sans-serif">[email protected]</font>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">cc</font></div>
<td>
<tr valign=top>
<td>
<div align=right><font size=1 face="sans-serif">Subject</font></div>
<td><font size=1 face="sans-serif">[Pixil-devel] ask for help</font></table>
<br>
<table>
<tr valign=top>
<td>
<td></table>
<br></table>
<br>
<br>
<br><font size=2 face="sans-serif"><br>
Hello,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
 &nbsp; my name is tao and I am application engineer in skyworks china,
i have download the pixil-1.2.3 and read its code,</font><font size=3>
</font><font size=2 face="sans-serif"><br>
there are one thing confuse me in function client_WaitForServer(...) in
client.c, <br>
 &nbsp; &nbsp;during wait for special type message,it will queue all other
type message, after successly receive the specail</font><font size=3> </font><font size=2 face="sans-serif"><br>
type message, it will do write zero length data into sock if queued other
type message, </font><font size=3><br>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp;write(sock, 0, 0);</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
i don't understant the the effect of this write operation, i will appreciate
any comments,</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
static int</font><font size=3> </font><font size=2 face="sans-serif"><br>
client_WaitForServer(int sock, int packet_type, pkt_buff_t **pkt, int timeout)
&nbsp; &nbsp;</font><font size=3> </font><font size=2 face="sans-serif"><br>
{</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp;do{</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; ...</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(qcount)</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;write(sock,0,0);</font><font size=3>
</font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return (0);</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; &nbsp; &nbsp; ...</font><font size=3> </font><font size=2 face="sans-serif"><br>
 &nbsp; &nbsp; }</font><font size=3> </font><font size=2 face="sans-serif"><br>
} </font><font size=3><br>
<br>
<br>
</font><font size=2 face="sans-serif"><br>
thanks you very much, in advance!</font><font size=3> <br>
</font><font size=2 face="sans-serif"><br>
regards</font><font size=3> </font><font size=2 face="sans-serif"><br>
tao</font><font size=2><tt>_______________________________________________<br>
Pixil-devel mailing list<br>
[email protected]<br>
http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel<br>
</tt></font>
<br>
--=_alternative 000B7D174825710F_=--


--===============0336484880==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Pixil-devel mailing list
[email protected]
http://www.pixil.org/cgi-bin/mailman/listinfo/pixil-devel

--===============0336484880==--