From: Dave R. <da...@sy...> - 2002-09-27 14:24:23
|
> I find the current discussion about low-water-marks and using > lots of special socket flags likely to run into trouble with all > the many TCP/IP stacks around. This is true. The low-water mark approach was an attempt at addressing the non-partial write() problem. Since neither OS I was testing with supports it, it's fair to suggest that there are likely to be problems. The :so-snd/rcvbuf really only address server performance. :so-keepalive and :so-oobinline, however, address correctness issues. > May I suggest something simple, like what I believe many other > programmers in other Lisps or languages do and which is portable > for sockets: in non-blocking mode, you can read _as much as is > available_ using a single read(). I think you can also write() a > large number, and the OS will tell you that it couldn't write all > and tell you how much it actually wrote. It's then up to you/the > application to deal with sending the rest at a later time. Yes, the final solution is going to require: - an interface to select() - non-blocking sockets - interfaces to partial read()/write() I'd also like an interface to the real interbal time, which is currently unavailable because the interruptprocessing logic is using it. I am quickly coming to the conclusion that CMUCL is a better platform for this application as these interfaces already exist. Dave |