I think that you are out of luck.

The Windows platform setsockopt docs don't explicitly mention this option in the table of "BSD options not supported for setsockopt are shown in the following table." about half way down the page.

However, if you look at the equivalent table for getsockopt, it is explicitly listed as unsupported.

That said, and without any knowledge of how this stuff works on *nix/BSD et al, I think that you are being naive to believe that setting the maximum segment size in the receiving application is going to have any affect at all on how much the sending application will choose to buffer.

My (limited) understanding of how this stuff works is that the TCP_MAXSEG has little or nothing to do with Application Layer(1) or Session layer(3) of the OSI stack which is where buffering occurs, but is at the Transport Layer(4). Meaning that it's value affects all communications between this end point and the down stream node, and is therefore a TDI layer configuration option, not a dynamic runtime option. It should only be configured on the basis of the type of pipe between nodes:ie. Dial-Up Modem -v- Cable Modem -v- PPPoE -v- ADSL/HDSL/VDSL -v- ISDN -v- Kilostream -v- Megastream etc.

If you could change it change it dynamically from an application, it would affect all communications from this end point and it's upstream partners--which seems like a bad idea to me.

I think it could be a bit of TheWildgoose chase :)


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

In reply to Re: Control TCP_MAXSEG (OS buffering) on Win32 by BrowserUk
in thread Control TCP_MAXSEG (OS buffering) on Win32 by TheWildgoose

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.