netdev
[Top] [All Lists]

Re: Opening more than 65000 sockets

To: Yan-Fa Li <yanfali@xxxxxxxxx>
Subject: Re: Opening more than 65000 sockets
From: "Nivedita Singhvi" <nivedita@xxxxxxxxxx>
Date: Fri, 29 Mar 2002 12:27:50 -0800
Cc: sri@xxxxxxxxxxxxxxxxxxxxx, Ben Greear <greearb@xxxxxxxxxxxxxxx>, Yan-Fa Li <yanfali@xxxxxxxxx>, netdev@xxxxxxxxxxx
Importance: Normal
Sender: owner-netdev@xxxxxxxxxxx
Sensitivity:
Are you doing a bind() to the unique local address you wanted?
Are you doing the setsockopt() prior to that?

bind() returns an EINVAL when the port is being used, if you havent
actually done a REUSEADDR, which is what you need in this
case..

thanks,
Nivedita


> Thanks for the tip.  I tried it out and it doesn't
> appear to work.  It actually fails with a different
> return code EINVAL (22).  Which isn't even a listed
> return code on the connect() man page :(

> Anybody else got any more ideas I can try ?

> Here's what I used:

> k=tcp and on=1

> setsockopt(*opensock,k->p_proto,SO_REUSEADDR,&on,
> sizeof(on));




<Prev in Thread] Current Thread [Next in Thread>