Skip to content

When receiving a relatively large data packet (larger than 8192), the last packet will block for 8 to 10 seconds at mKissnetSocket.recv(receiveBuffer). #10

@luodaoyi

Description

@luodaoyi

When receiving a relatively large data packet (larger than 8192), the last packet will block for 8 to 10 seconds at mKissnetSocket.recv(receiveBuffer).

        const uint64_t tickStart = GetTickCount64(); 
        auto[received_bytes, status] = mKissnetSocket.recv(receiveBuffer); 
        const auto tick = GetTickCount64() - tickStart;
        if (tick > 1000) {
            KCP_LOGGER(false, LOGG_NOTIFY, "Recv Time:  " << tick);   // <----------  10 Second !!!!
        }

The server is developed using kcp-go with the following parameters:

    kcpConn.SetNoDelay(1, 10,2,1)
    kcpConn.SetWindowSize(128, 128)

kcp-cpp:

	KCPSettings lSettingsClient;
	lSettingsClient.mNoDelay = true;
	lSettingsClient.mInterval = 10;
	lSettingsClient.mResend = 2;
	lSettingsClient.mFlow = false;
	lSettingsClient.mMtu = 1400;
	lSettingsClient.mSndWnd = 128;
	lSettingsClient.mRcvWnd = 128;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions