🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: es.comp.os.linux.programacion
Article #13112

Re: Buscando una primitiva de lectura de socket no bloqueante

#13112
From: Ignacio Arenaza
Date: Sat, 31 Mar 2001 22:06
28 lines
2007 bytes
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>>>>> "Alfredo" == Alfredo Naime <anaime@leon.ciens.ucv.ve> writes:

    Alfredo> indefinidamente. Logicamente, deberia tener un mecanismo
    Alfredo> para cancelar la lectura y mostrar el mensaje de "tiempo
    Alfredo> de lectura expirado" (time out) despues de un tiempo
    Alfredo> determinado o tener una forma de saber si ha llegado un
    Alfredo> mensaje antes de ejecutar la operacion de lectura.

Creo que lo que necesitas es usar select(2) que te permite mirar si un
socket tiene o no datos y especificar un tiempo maximo de espera para
los datos. Mas detalles en la pagina del manual de select(2).

Saludos. I�aki.

- -- 
  Get PGP/GPG Keys at http://www.escomposlinux.org/iarenaza/pgpkey.html

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.4 (GNU/Linux)
Comment: Processed by Mailcrypt and GPG

iD8DBQE6xlTmZXLnGT1HLgcRAmaOAJwK/O9e7qFBcPVPjFousqEYX7Wx0gCfZQFw
BTDj9fdBNYWYejtmusH58oE=
=5FAU
-----END PGP SIGNATURE-----
Technical Details
Message-ID: <87bsqhwq3d.fsf@eb2ebu.ampr.org>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!newsfeed.mad.ttd.net!news.mad.ttd.net!news.bcn.ttd.net!not-for-mail
References: <99rj2v$2iq6e$1@ID-81973.news.dfncis.de>

Show Full Headers
Complete Article Headers
X-Google-Language: SPANISH,ASCII
X-Google-Thread: f86c8,cfe4f18a9b910c33
X-Google-Attributes: gidf86c8,public
X-Google-ArrivalTime: 2001-04-01 07:44:16 PST
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-02!supernews.com!nntp-relay.ihug.net!ihug.co.nz!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!skynet.be!Amsterdam.Infonet!News.Amsterdam.UnisourceCS!newsfeed.mad.ttd.net!news.mad.ttd.net!news.bcn.ttd.net!not-for-mail
From: Ignacio Arenaza <iarenaza@eb2ebu.ampr.org>
Newsgroups: es.comp.os.linux.programacion
Subject: Re: Buscando una primitiva de lectura de socket no bloqueante
Date: 01 Apr 2001 00:06:30 +0200
Organization: Servidor NNTP de eb2ebu.ampr.org
Lines: 28
Message-ID: <87bsqhwq3d.fsf@eb2ebu.ampr.org>
References: <99rj2v$2iq6e$1@ID-81973.news.dfncis.de>
NNTP-Posting-Host: 193-153-225-37.uc.nombres.ttd.es
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7