This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

c6455 bios 基础上配置NDK ,小问题



我的C6455配置接收缓冲区大小为8192

//
    // This code sets up the TCP and UDP buffer sizes
    // (Note 8192 is actually the default. This code is here to
    // illustrate how the buffer and limit sizes are configured.)
    //

    // UDP Receive limit
    rc = 8192;
    CfgAddEntry( hCfg, CFGTAG_IP, CFGITEM_IP_SOCKUDPRXLIMIT,
                 CFG_ADDMODE_UNIQUE, sizeof(uint), (UINT8 *)&rc, 0 );

然后开启守护进程:

hHello = DaemonNew( SOCK_DGRAM, 0, 7, dtask_udp_hello,
                       OS_TASKPRINORM, OS_TASKSTKNORM, 0, 1 );

接收如下:

count = (int)recvncfrom( s, (void **)&p_Buf, 0, (PSA)&sin1, &tmp, &hBuffer );

问题如下:

每次我只能收512字节数据,有时候能收513,我一帧数据有6000多,一次不能收完全接收,要分多次接收,这是怎么回事?明明缓冲区分配了8192,一次收6000应该没问题啊????大神呢????