Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iRcvBufSize value always is DEF_BUFFER_SIZE, Won't it changed ? #2290

Closed
kubbo opened this issue Apr 13, 2022 · 2 comments
Closed

iRcvBufSize value always is DEF_BUFFER_SIZE, Won't it changed ? #2290

kubbo opened this issue Apr 13, 2022 · 2 comments
Labels
Type: Question Questions or things that require clarification
Milestone

Comments

@kubbo
Copy link

kubbo commented Apr 13, 2022

version: 1.4.4
Hi:
No matter which value(server and client ) I changed , like SRTO_RCVBUF, SRTO_FC ,SRTO_MSS and so on, the handshake flow window always is 8192, I see the code like blow, but it not executed ?

    static void set(CSrtConfig& co, const void* optval, int optlen)
    {
        const int val = cast_optval<int>(optval, optlen);
        if (val <= 0)
            throw CUDTException(MJ_NOTSUP, MN_INVAL, 0);

        // Mimimum recv buffer size is 32 packets
        //1500 -28
        const int mssin_size = co.iMSS - srt::CPacket::UDP_HDR_SIZE;
        //(1500-28) * 32
        if (val > mssin_size * co.DEF_MIN_FLIGHT_PKT)
            co.iRcvBufSize = val / mssin_size;
        else
            co.iRcvBufSize = co.DEF_MIN_FLIGHT_PKT;

        // recv buffer MUST not be greater than FC size
        if (co.iRcvBufSize > co.iFlightFlagSize)
            co.iRcvBufSize = co.iFlightFlagSize;



    }
@kubbo kubbo added the Type: Question Questions or things that require clarification label Apr 13, 2022
@maxsharabayko
Copy link
Collaborator

Please note, that the allowed value of SRTO_RCVBUF is also limited by the value of the flow control window size SRTO_FC socket option. See issue #700.

@maxsharabayko maxsharabayko added this to the v1.4.5 milestone May 3, 2022
@maxsharabayko
Copy link
Collaborator

Closing due to lack of activity.
Expected resolution: set SRTO_FC before SRTO_RCVBUF (see issue #700).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Question Questions or things that require clarification
Projects
None yet
Development

No branches or pull requests

2 participants