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.

CC3235MODASF: Increase UDP socket buffer size

Part Number: CC3235MODASF
Other Parts Discussed in Thread: CC3235SF

Hello,

I am having trouble increasing the size of a UDP socket buffer using TI's POSIX API. I tested my code in the UDP example project provided in TI's SDK (C:\ti\simplelink_cc32xx_sdk_4_40_00_07\examples\rtos\CC3235SF_LAUNCHXL\ns\udpecho), but even there the setsocketopt() function fails. Below is a snippet of my code. Most of the code is provided in the example project. Thank you!

    server = socket(AF_INET, SOCK_DGRAM, 0);
    if (server == -1) {
        Display_printf(display00"Error: socket not created.\n");
        goto shutdown;
    }

    memset(&localAddr0sizeof(localAddr));
    localAddr.sin_family = AF_INET;
    localAddr.sin_addr.s_addr = htonl(INADDR_ANY);
    localAddr.sin_port = htons(arg0);

    status = bind(server, (struct sockaddr *)&localAddrsizeof(localAddr));
    if (status == -1) {
        Display_printf(display00"Error: bind failed.\n");
        goto shutdown;
    }
    SlNetSock_Winsize_t socketBuffer;
    socketBuffer.winSize = 3000;
    if(setsockopt(server, SOL_SOCKET, SO_RCVBUF, (uint8_t *)&socketBuffer, sizeof(socketBuffer)) != 0)
    {
        Display_printf(display, 00"ERROR -> UDP Handler: failed to change socket buffer size.\n");
    }