How many sockets can I get from accept()?
Sergei Organov
osv at javad.ru
Mon Feb 18 15:14:18 UTC 2002
Eric,
You are right, it was CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS and as usual
I've found it myself a few minutes after I've posted the question :-)
Thank you anyway for your quick response.
BR,
Sergei.
Eric Norum <eric.norum at usask.ca> writes:
> Sergei Organov wrote:
> >
> > Hello,
> >
> > In my application 6'th invocation of accept() on a socket starts to just
> > return -1 after 5 connections have been already accepted and not yet
> > closed. As soon as I close one of previously accepted connections, accept()
> > returns to its normal operation. Is 5 connections an arbitrary limit and if
> > so, where it is defined?
> >
> > BR,
> > Sergei.
>
> Did you check the value of errno after the failing calls? My guess is
> that you're hitting the limit of maximum open file descriptors. This is
> a simple confdefs.h parameter:
>
> #define CONFIGURE_LIBIO_MAXIMUM_FILE_DESCRIPTORS 50
>
> You could perhaps be running out of mbufs, too. Check the errno -- it
> should help you find the problem.
>
> --
> Eric Norum eric.norum at usask.ca
> Department of Electrical Engineering Phone: (306) 966-5394
> University of Saskatchewan FAX: (306) 966-5407
> Saskatoon, Canada.
More information about the users
mailing list