IrDA and bind
The Windows Sockets bind function is used by IrDA server applications to register to receive incoming connections addressed to a specified service name on the specified socket. The bind function associates a server socket with an application-level address.
The following sample demonstrates using the bind function for an IrDA application:
SOCKADDR_IRDA ServSockAddr = { AF_IRDA, 0, 0, 0, 0, "SampleIrDAService" };
int SizeOfSockAddr;
if (bind(ServSock, (const struct sockaddr *) &ServSockAddr, sizeof(SOCKADDR_IRDA)) == SOCKET_ERROR)
{
// call WSAGetLastError
}
A bind function call in an IrDA application causes the stack to generate a new local LSAP-SEL and add it to the IAS database associated with the service name supplied in SOCKADDR_IRDA.