[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] What happens to udp (and tcp) connections when changing ip
From: |
massimiliano cialdi |
Subject: |
[lwip-users] What happens to udp (and tcp) connections when changing ip address? |
Date: |
Wed, 12 Jul 2017 10:00:20 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lwip-users] What happens to udp (and tcp) connections when changing ip address?,
massimiliano cialdi <=