Bluetooth and getsockname

Bluetooth uses the getsockname function to retrieve the server device address and port number allocated to a socket through a previous call to the bind function.

For more information, see Windows Sockets.

Windows Sockets

getsockname

bind