Features of the socket class:
Using the socket class:
extern sockaddr* address; char[1024] buffer; socket s(AF_INET, SOCK_STREAM); s.connect(address, sizeof(sockaddr_in)); s.read(buffer, 1024); s.shutdown();
Note that this socket class is an exposition of the operating system primitives; the true generic representation of a communication stream is the basic_socketbuf template class.