IrDA and socket
The Windows Sockets socket function creates a connection endpoint of type SOCKET. The connection endpoint is an application anchor for future references to a connection; the connection is not established with this function call. Clients and servers begin all communication by opening a socket.
The following sample demonstrates using the socket function for an IrDA application:
SOCKET ServSock;
if ((ServSock = socket(AF_IRDA, SOCK_STREAM, 0)) == INVALID_SOCKET)
{
// call WSAGetLastError
}