static unsafe extern SSizeT writev(int fd, IOVector* iov, int iovcnt);
static unsafe extern SSizeT readv(int fd, IOVector* iov, int iovcnt);
public int Write(IOVector[] iov) { return Write (iov, 0, iov.Length); }
public int WriteV(IOVector* iov, int count) { //FIXME: Handle EINTR here or elsewhere //FIXME: handle r != count //TODO: check offset correctness int r = (int)writev (Handle, iov, count); if (r < 0) throw UnixError.GetLastUnixException (); return r; }
public int Write(IOVector[] iov, int offset, int count) { //FIXME: Handle EINTR here or elsewhere //FIXME: handle r != count //TODO: check offset correctness fixed (IOVector* bufP = &iov[offset]) { int r = (int)writev (Handle, bufP + offset, count); if (r < 0) throw UnixError.GetLastUnixException (); return r; } }