I use lwip 2.0.2 + FreeRTOS 9.0.0

I have a ask that implement udp server:

static void udpMan_Task(void)
{
    struct netbuf *buf;
    char *buffer;
    err_t err;
    client_desc_t client;

    UdpConn = netconn_new(NETCONN_UDP);
    LWIP_ASSERT("con != NULL", UdpConn != NULL);

int timeout_ms = DHCP_FINE_TIMER_MSECS; // this timeout has to be less than DHCP_FINE_TIMER_MSECS

    while (1) {
        err = netconn_bind(UdpConn, NULL, CONFIG_UDP_PBUS_PORT);
        netconn_set_recvtimeout (UdpConn, timeout_ms);

        while ((err == ERR_OK) || (err == ERR_TIMEOUT)) {
            err = netconn_recv(UdpConn, &buf);
            if (err == ERR_OK) {
                // compute received data
            }

        } // end receiving loop
        vTaskDelay(1000);

    } // end global loop
}


What happens when changing ip address with netifapi_netif_set_addr()? What actions should i do in the udp task?
How can I notice the change of IP?


best regards

Max



_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to