EthernetNetIf Compatibility.
Dependents: XBeeWiFi_SPI_example
Fork of NetServicesSource by
Diff: if/lwip/LwipNetIf.cpp
- Revision:
- 3:95e0bc00a1bb
- Parent:
- 2:a4f97773c90f
- Child:
- 9:c79fa4034f5b
diff -r a4f97773c90f -r 95e0bc00a1bb if/lwip/LwipNetIf.cpp --- a/if/lwip/LwipNetIf.cpp Fri Jun 18 09:22:54 2010 +0000 +++ b/if/lwip/LwipNetIf.cpp Fri Jun 18 10:38:57 2010 +0000 @@ -31,9 +31,9 @@ //See doc/rawapi.txt for details -LwipNetIf::LwipNetIf() : NetIf(), m_tcpTimer(), m_init(false) +LwipNetIf::LwipNetIf() : NetIf(), m_tcpTimer(), m_dnsTimer(), m_init(false) { - m_tcpTimer.start(); + } @@ -51,6 +51,7 @@ //Setup Clocks m_tcpTimer.start(); + m_dnsTimer.start(); //m_tcpTicker.attach_us( tcp_tmr, TCP_TMR_INTERVAL * 1000 ); //TCP_TMR_INTERVAL = 250 ms in tcp_impl.h //m_dnsTicker.attach_us( dns_tmr, DNS_TMR_INTERVAL * 1000 ); //DNS_TMR_INTERVAL = 1000 ms in dns.h } @@ -77,11 +78,16 @@ void LwipNetIf::poll() { - if(m_init && m_tcpTimer.read_ms()>=TCP_TMR_INTERVAL) + if(m_init && m_tcpTimer.read_ms() >= TCP_TMR_INTERVAL) { m_tcpTimer.reset(); tcp_tmr(); //Poll LwIP } + if(m_init && m_dnsTimer.read_ms() >= DNS_TMR_INTERVAL) + { + m_dnsTimer.reset(); + dns_tmr(); + } //Do some stuff... }