<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><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;">----- Original Message ----<br>From: Iulian Moraru <iulian@gmail.com><br>To: Sisteme de Operare
<so@cursuri.cs.pub.ro><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 ymailto="mailto:carpalex@gmail.com" href="mailto:carpalex@gmail.com">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>> so mailing list<br>> <a ymailto="mailto:so@cursuri.cs.pub.ro" 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>_______________________________________________<br>so mailing list<br><a ymailto="mailto:so@cursuri.cs.pub.ro" 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></div><br></div></div><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/">Yahoo! for Good</a>
</body></html>