Bluetooth and accept

Bluetooth uses the accept function to enable incoming connection attempts on a socket. The BTH_ADDR of the client application is obtained by reading the Bluetooth transport-specific section of the returned sockaddr structure. Use of the accept function with Bluetooth has the following format:

  • The addr parameter of the accept function is an optional pointer to a buffer that receives the address of the connecting entity, as known to the communications layer. A pointer to a SOCKADDR_BTH structure with the remote Bluetooth device address is returned.
  • The addrlen parameter of the accept function is an optional pointer to an integer that contains the length, in bytes, of addr. The integer must be greater or equal to the value of sizeof (SOCKADDR_BTH).

Windows Sockets

accept