🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.linux.networking
Article #811

Re: non-blocking accept()?

#811
From: Alain Magloire
Date: Wed, 13 May 1998 00:00
24 lines
1683 bytes
Manfred Hallas (e9226266@stud1.tuwien.ac.at) wrote:
: Hi folks!

: How can I make the following C command

:     int accept (int s, struct sockaddr *addr, int *addrlen)

: (who accept a connection on a socket) non-blocking under
: Linux with gcc???
: I think I have to mark the socket s non-blocking, but I don't know
: how :-(((  and the SO_SNDLOWAT at setsockopt() doesn't
: exist under Linux...

the simplest would be to use select () before doing the accept ()
set the descriptor non-blocking with ioctl ()(FIONBIO).

good luck


--
au revoir, alain
----
Aussi haut que l'on soit assis, on n'est toujours assis que sur son cul !!!
Technical Details
Message-ID: <6jd7ie$de6@sifon.cc.mcgill.ca>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <355A00FE.1354F22D@stud1.tuwien.ac.at>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,b4153cb341347981
X-Google-Attributes: gid11318c,public
X-Google-Thread: 10a73c,b4153cb341347981
X-Google-Attributes: gid10a73c,public
X-Google-Thread: 10669a,b4153cb341347981
X-Google-Attributes: gid10669a,public
X-Google-Thread: faa64,b4153cb341347981
X-Google-Attributes: gidfaa64,public
X-Google-Thread: f65d0,b4153cb341347981
X-Google-Attributes: gidf65d0,public
X-Google-Thread: 10acab,b4153cb341347981
X-Google-Attributes: gid10acab,public
From: alainm@news.mcgill.ca (Alain Magloire)
Subject: Re: non-blocking accept()?
Date: 1998/05/13
Message-ID: <6jd7ie$de6@sifon.cc.mcgill.ca>
X-Deja-AN: 353020719
References: <355A00FE.1354F22D@stud1.tuwien.ac.at>
Followup-To: comp.os.linux.networking,de.comp.os.linux.networking,linux.dev.gcc,alt.os.linux,gnu.gcc.help,gnu.gcc
Organization: McGill University Computing Centre
Newsgroups: comp.os.linux.networking,de.comp.os.linux.networking,linux.dev.gcc,alt.os.linux,gnu.gcc.help,gnu.gcc