h6. [[Internet]] h6(. » [[Internet SWI Calls|SWI Calls]] h6((. » Socket_Read h2. Socket_Read h5. (SWI &41213) |_<^{width:4em}. Entry | | |<^. R0 |<^. Socket descriptor | |<^. R1 |<^. Pointer to buffer to receive into | |<^. R2 |<^. Size of buffer | |_<^{width:4em}. Exit | | |<^. R0 |<^. Number of bytes received | h4. Use The purpose of this call is to read data from a socket. It is equivalent to calling [[Socket_Recv|recv()]] with flags of 0. h4. Berkeley sockets equivalence This SWI directly corresponds to the function "read":https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html and would ordinarily be called from C using the <code>socketread()</code> function in <code>socklib.h</code>. h4. Notes The different function name is needed because in RISC OS file descriptors and socket descriptors come from two different number spaces, while under Unix they share the same number space so a single <code>read()</code> function serves to read from either type. h4. See also * [[Internet]] * [[Socket_Readv]]