lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: Issue with udp_input() and source ports


From: Jakob Stoklund Olesen
Subject: [lwip-users] Re: Issue with udp_input() and source ports
Date: Mon, 10 Aug 2009 15:52:43 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux)

Brian Lam <address@hidden> writes:

> My current workaround is to create one unconnected pcb just for
> receiving on all ports and another connected one for sending.

Hi Brian,

As Simon says, you should normally use sendto() instead of connect()
when sending UDP. Calling connect() on a UDP socket means that you can
only communicate with the connected host, even though UDP is
connectionless. This can make sense when talking to a known DNS server
for instance.

/jakob





reply via email to

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