On 05.09.16 15:42, Maxim Sobolev wrote:
> Suppose we have two threads in the system both bound to a same specific UDP
> port, one using INADDR_ANY and another one using actual IP. When incoming
> message arrives to that port is there any guarantee as to which of those
> two threads going to see the message? The question has arisen from the
> observation that most of the time the thread that is bound to a specific IP
> gets them, but occasionally we see INADDR_ANY-bound thread receiving few
> packets as well. So that behavior seems to be "almost deterministic" and we
> are wondering where that "almost" part is expected or some kind of socket
> matching bug?

Are your sockets connected? I.e. did you use connect+send? And do you
receive unicast datagrams or some broadcast/multicast can appear?

-- 
WBR, Andrey V. Elsukov

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to