The HyperNews Linux KHG Discussion Pages

## readv/writev & other sock funcs

  Forum: The Linux Kernel Hackers' Guide
  Keywords: socket programming readv
  Date: Mon, 21 Oct 1996 19:58:50 GMT
  From: Dave Wreski <dwreski@ultrix.ramapo.edu>

I'm having a problem writing code to make use of readv() and the iovec struct. I'm pretty sure I'm doing it correctly, as I have spent countless hours troubleshooting (seasoned newbie here) Should I post to linux-c-programming, or is it ok to ask kernel/C/socket questions here? I'm using 2.0.20 or so, and I have one writev() that writes two iovec structs to a socket. The readv() on the other end requires two reads (well, readv's), to gather the data, and it doesn't seem to even be placed back together in my header properly. Any ideas on pointers, or directions? I have most of Stevens' books, and have scoured them. They seem to be more interested in fd passing, which I don't need. (should I be using sendmsg()/recvmsg()?) Thanks so much, Dave Wreski dwreski@ultrix.ramapo.edu