max value for SO_RCVBUF in Windows?
Asked Answered
F

4

7

Quick question, wondering if anyone knew what the limit is for SO_RCVBUF under Windows.

Fortunna answered 19/2, 2009 at 15:21 Comment(0)
A
3

SO_RCVBUF in winsock is not limited by the TCP window size. At least for pre-Vista stacks. It would be limited by non-paged pool availability, which is a whole different topic. So you can make it quite big, if you want to.

Obligatory unsolicited advice: If you are using a large buffer because you are receiving infrequently, I would look into asynchronous I/O with events/select/completion ports.

Annulus answered 13/3, 2009 at 13:14 Comment(0)
S
2

I can't recall for sure, but I believe Windows supports the POSIX function fpathconf() with the _PC_SOCK_MAXBUF option. If so, this is exactly what you're looking for.

Somnolent answered 21/2, 2009 at 18:57 Comment(0)
E
0

Based on this article, it looks like the maximum is 64K.

Ennis answered 20/2, 2009 at 21:14 Comment(1)
I am not sure this is correct. I'm setting it to values significantly larger without error. The article you quote is rather old.Speakeasy
W
0

Based on MsQuic source code max SO_RCVBUF is INT32_MAX

Wnw answered 29/3, 2024 at 12:23 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.