Hi, I'm using select() before write() to a TCP socket, in order to be sure that I won't block on the write() if the other end's network connection has broke. However, I found out that if I pass a buffer bigger than ~50k to write(), it will block anyway! Any idea what's up with that? write()s to a TCP socket are normally cut off at 102808 bytes, without blocking -- i.e. write() just returns this value if I pass a bigger size. I suspect that's the TCP window size so that's why the cut-off happens. But where is this 50k value coming from? Can I count on it being consistent, or can it happen with 20k or 2k one day? And why doesn't select() stand up to its promise, anyway?
-- Alex Shnitman <[EMAIL PROTECTED]> http://alexsh.hectic.net/ UIN 188956 PGP 0xEC5D619D / E1 F2 7B 6C A0 31 80 28 63 B8 02 BA 65 C7 8B BA ================================================================= To unsubscribe, send mail to [EMAIL PROTECTED] with the word "unsubscribe" in the message body, e.g., run the command echo unsubscribe | mail [EMAIL PROTECTED]
