Asks the operating system what address & port this socket is actually bound to and updates the internal buffers accordingly.
This can be useful when you bind to port 0 which means that the OS will choose a random port for you and you want to find out which one was chosen.
0 on success, -1 on failure
See Implementation
Asks the operating system what address & port this socket is actually bound to and updates the internal buffers accordingly.
This can be useful when you bind to port 0 which means that the OS will choose a random port for you and you want to find out which one was chosen.