SO_ACCEPTCONN equivalent

Vlad GALU dudu at dudu.ro
Wed Mar 7 15:09:35 UTC 2007


On 3/7/07, Alexandru Arion <aarion at bitdefender.com> wrote:
> Hi,
>
> I'm rather new here, so excuses in advance if the question is out of
> topic.
>
> Is there an equivalent in FreeBSD to the SO_ACCEPTCONN option for
> getsockopt(), available in Linux? It doesn't actually has to be an
> option for getsockopt(), just a way to determine if a socket has been
> marked to accept connections with listen().

  You can accept() on that socket, which should return EINVAL if the
socket wasn't previously passed as an argument to listen(). For the
afirmative case, make sure you use non-blocking sockets, otherwise
accept() will block.

>
> Thank you,
> Alex Arion
>
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"
>


-- 
If it's there, and you can see it, it's real.
If it's not there, and you can see it, it's virtual.
If it's there, and you can't see it, it's transparent.
If it's not there, and you can't see it, you erased it.


More information about the freebsd-net mailing list