Greg, Nicely put and that's exactly what I had in mind but after spending 10 hours flogging to St Pete & back my mind isn't working as well as normal! (Mind due, does it ever??) Of course I was going to use the TCP_ flags but the APR should do the job... That said, we don't currently allow the user to set TCP_CORK or TCP_NOPUSH, so maybe we should think about that? Tracking the TCP_ options might be safer and more flexible?
david [apologies to Greg for sending him this twice, but I forgot about the reply all again until I'd sent it!!!] > > Some of this is apr specific, so ... > > > > It seems like a good idea to keep track of what we have set as the socket > > options. Should we simply use a variable (apr_int32_t umask for example) > > and check the bits? Would this work across all platforms? Bill? Brian? > > It should definitely work across all platforms. When you stop and realize > that APR has a portable setsockopt() interface, then we simply track *those* > flags. We don't have to track what's happening at the platform-specific > level. > > You've got 10 flags listed in apr_network_io.h. Just keep those flags in the > socket structure in an "int" somewhere (no need to get complicated with an > apr_int32_t). > > When an apr_setsockopt() actually changes one of the flags, then you reflect > that down into the platform-specific socket. > > Cheers, > -g > > -- > Greg Stein, http://www.lyra.org/ >
