Skip to content

It is recommended to add MaxSegmentSize to Socket.SetSocketOption #113904

@zhh0000zhh

Description

@zhh0000zhh

Due to special needs, I need to manually set MSS. Currently, it can only be called through P/Invoke. I hope it can be natively supported.

` socket.SetSocketOption(SocketOptionLevel.Tcp, SocketOptionName.MaxSegmentSize, mssValue);

Or provide the ability to directly call the underlying setoption. At present, it only needs to allow optionname to be input as int and add optlen. Although the definition of optlen is different in different operating systems (windows is int, linux/unix is ​​uint), since optlen generally does not exceed int.max, such differences can be ignored.

` public void SetSocketOption(int optionLevel, int optionName, intptr optionValue, int optlen);

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions