Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Programmatically verify if a UDP port is bound in C/C++

Tags:

c++

sockets

udp

Without attempting to bind it


1 Answers

This should do the trick...


int getsockname(int socket, struct sockaddr *restrict address,
   socklen_t *restrict address_len);

like image 76
ProZach Avatar answered Nov 23 '25 14:11

ProZach



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!