[JDEV] Minor 'bug'let ?

Jeremie Miller jeremie at netins.net
Tue Jan 5 14:28:13 CST 1999

> Though I admit that I do not completely understand the code; a minor
> buglet showed up on FreeBSD (if you optimize and non-null your structs).

> [snippet smooshed]

> Otherwise if the read_fd_set happens to contani cruft, the accept
> further down is triggered tooo easily.

Yes, thanks, nasty little bug that happened when I just rearranged a bunch
of that code... thanks!  Should appear in the nightly build.

> Secondly, given that the active_fd_set is (re)build each time; it
> is worthwhile to keep a maxfd; rather than FD_SETSIZE; at least
> on FreeBSD that makes a speed difference.

I'm no god on this select stuff, so could you explain what you mean?  I'm
not sure what the FD_SETSIZE really does I guess.

> Thirdly setting TCP_NODELAY and alllowing for port REUSE might be
> nice. 
>         if( (setsockopt(c->id,SOL_SOCKET,SO_REUSEADDR,(const char
> *)&one,sizeof(one))) <0)

This one is already in the socket.c file.

>         if( (setsockopt(c->id,IPPROTO_TCP,TCP_NODELAY,(const void
> *)&one,sizeof(one))) <0) 

What does TCP_NODELAY exactly do?  I've read up on some of this stuff, but
it's not always clear.


More information about the JDev mailing list