2005 Kjell Åge Bringsrud & Pål Halvorsen. INF1060 – introduction to operating systems and data communication. Alternatives to Read & Write. ▫ The call recv(sock, buffer, n, flags);. ▫ Reads n characters. ▫ From socket sock. ▫ Stores them in the character array buffer. ▫ Flags, normally just 0, but e.g., MSG_DONTWAIT.