[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] dns_gethostbyname

From: Krzysztof Wesołowski
Subject: Re: [lwip-users] dns_gethostbyname
Date: Thu, 30 Apr 2015 18:47:21 +0200

On Thu, Apr 30, 2015 at 10:37 AM, Sandra Gilge <address@hidden> wrote: 
It is stated that dns_gethostbyname is for the raw-api. Is there a reason to use it in combination with sockets? Is there a thread safety issue?

AFAIR dns_gethostbyname  uses other tcpip thread only components, so using it from outside this thread can be unsafe.

You can however post your callback to be executed on lwip thread - it is usually sufficient (we use similar patter to handle incoming udp data via callback in tcpiip thread instead of blocking with netconn).

Krzysztof Wesołowski

reply via email to

[Prev in Thread] Current Thread [Next in Thread]