E ok daca operatiile I/O din client sunt sincrone (blocante)? Personal nu vad niciun motiv pentru care ar fi altcumva...<br><br><div class="gmail_quote">On Dec 10, 2007 8:49 PM, Dragos Sbarlea <<a href="mailto:sbarlead@yahoo.com">
sbarlead@yahoo.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div style="font-family: times new roman,new york,times,serif; font-size: 14pt;">
Yup, dar, din ce am citit POSIX spune ca fcntl se foloseste pentru asta...<div class="Ih2E3d"><br><div> </div>Dragos Dumitru Sbīrlea<br><span style="color: rgb(91, 91, 91);">Facultatea de Automatica si Calculatoare</span>
<br style="color: rgb(91, 91, 91);"><span style="color: rgb(91, 91, 91);">Universitatea Politehnica din Bucuresti</span></div><div style="font-family: times new roman,new york,times,serif; font-size: 14pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div class="Ih2E3d">----- Original Message ----<br>From: "<a href="mailto:cosminratiu@gmail.com" target="_blank">cosminratiu@gmail.com</a>" <<a href="mailto:cosminratiu@gmail.com" target="_blank">cosminratiu@gmail.com
</a>><br>To: Sisteme de Operare <<a href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a>><br></div><div><div></div><div class="Wj3C7c">Sent: Monday, 10 December, 2007 8:31:14 PM<br>Subject: Re: [so] [Tema4] Operatii asincrone
<br><br>Mai simplu este cu ioctl cu FIONBIO, asa cum e in
laborator.<br><br><pre>//puts a socket in nonblocking mode<br>void set_nonblocking(int s)<br>{<br>        int m = 1;<br>        ioctl(s, FIONBIO, &m);<br>}<br></pre><br><br><div class="gmail_quote">
On Dec 10, 2007 7:19 PM, Dragos Sbarlea <<a rel="nofollow" href="mailto:sbarlead@yahoo.com" target="_blank">sbarlead@yahoo.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: times new roman,new york,times,serif; font-size: 14pt;">Ca sa fim chitibusari (sau iubitori de corectitudine) ar trebui mai intai sa luam flagurile curente (F_GETFL) pentru socket si apoi sa adaugam flagul O_NONBLOCK. :)
<br><br>Cum celelalte flaguri nu prea se pot folosi la socketi cred ca e ok si asa, dar cine stie...<br><br> Dragos Dumitru Sbīrlea<br><span style="color: rgb(91, 91, 91);">Facultatea de Automatica si Calculatoare</span>
<br style="color: rgb(91, 91, 91);"><span style="color: rgb(91, 91, 91);">Universitatea Politehnica din Bucuresti</span><div style="font-family: times new roman,new york,times,serif; font-size: 14pt;"><br><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;">
<div>----- Original Message ----<br>From: Iulian Moraru <<a rel="nofollow" href="mailto:iulian@gmail.com" target="_blank">iulian@gmail.com</a>><br>To: Sisteme de Operare
<<a rel="nofollow" href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a>><br>Sent: Monday, 10 December, 2007 2:00:58 PM<br>Subject: Re: [so] [Tema4] Operatii asincrone<br><br>On Dec 10, 2007 1:40 PM, Alexandru-Mihai Carp <
<a rel="nofollow" href="mailto:carpalex@gmail.com" target="_blank">carpalex@gmail.com</a>>
wrote:<br>> Lucian Adrian Grijincu wrote:<br>> ><br>> > Pentru socketi trebuie folosite operatii non-blocante.<br>> ><br>> ><br>> Pai read / write sau recv / send sunt blocante, daca nu stim cat avem
de<br>> trimis / primit.<br>> Singura modalitatate de a fi non-blocante e sa ne asiguram ca nu
citim<br>> mai mult decat ni s-a trimis, nu?<br><br>Faci ca socketul sa fie non-blocant cu fcntl, comanda F_SETFL si<br>flagul O_NONBLOCK. Pe urma read, write, send si recv se vor comporta<br>diferit (cauta EAGAIN in paginile lor de manual).
<br><br>Iulian<br><br><br><br>> _______________________________________________<br></div><div>> so mailing list<br>> <a rel="nofollow" href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a><br>
> <a rel="nofollow" href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</a><br>><br>_______________________________________________<br>so mailing list
<br>
<a rel="nofollow" href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a><br><a rel="nofollow" href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so
</a><br>
</div></div><div><br></div></div></div><div><br>
<hr size="1"> Support the World Aids Awareness campaign this month with <a rel="nofollow" href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/" target="_blank">
Yahoo! for Good</a>
</div></div><br>_______________________________________________<br>so mailing list<br><a rel="nofollow" href="mailto:so@cursuri.cs.pub.ro" target="_blank">so@cursuri.cs.pub.ro</a><br><a rel="nofollow" href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</a><br><br></blockquote></div><br>
</div></div></div><br></div></div><div><div></div><div class="Wj3C7c"><br>
<hr size="1"> Support the World Aids Awareness campaign this month with <a href="http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51947/*http://uk.promotions.yahoo.com/forgood/" target="_blank">
Yahoo! for Good</a>
</div></div></div><br>_______________________________________________<br>so mailing list<br><a href="mailto:so@cursuri.cs.pub.ro">so@cursuri.cs.pub.ro</a><br><a href="http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so" target="_blank">
http://cursuri.cs.pub.ro/cgi-bin/mailman/listinfo/so</a><br><br></blockquote></div><br>