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.

MCU-PLUS-SDK-AM243X: lwip setsockopt so_reuseaddr failed

Part Number: MCU-PLUS-SDK-AM243X

Recently, I am implementing TCP server/client on AM243X LP.

I try to set the client socket to be SO_REUSEADDR:

int opt = 1;

if (lwip_setsockopt(sockfd, SOL_SOCKET,
                                   SO_REUSEADDR | SO_REUSEPORT
                                  , &opt, sizeof(opt)) < 0)
{

        return -1;
}

And it always failed.

Could you indicate if I have done anything wrong?