Re: casually blocked UDP port

Andreas Wehrmann via Boost-users <[email protected]>
Newsgroups gmane.comp.lib.boost.user
Message-ID <[email protected]>
Am 14.01.2022 um 22:50 schrieb Alexander Carôt via Boost-users:
> Hello all,
>
> I have a problem with a a casually blocked UDP bind port: My application uses UDP port 50050 and initiates the socket this way:
>
> So I am basically using bind port 50050 and if it fails I am increasing it by one until the bind suceeds. In most cases the bind to port 50050 works fine but casually after a relaunch of the app or a crash the bind port 50050 appears to be blocked which is why it increases to higher numbers.
>

Hi,
be aware that UDP sockets may are opened and closed for sending a single 
request only by many applications/services.
If the sending application doesn't care about the local port and leaves 
it up to the OS to assign a local port number,
you may run into the situation that another application/service/daemon 
is opening a UDP socket,
not caring about the local port and the OS happens to assign the port 
number that you want to bind your own socket to.

All the best,
Andreas

_______________________________________________
Boost-users mailing list
[email protected]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.