int index; int sent = 0; int rv;
PRInt32 rv, err; PRThread *me = _PR_MD_CURRENT_THREAD(); PRInt32 index, amount = 0; PRInt32 osfd = fd->secret->md.osfd;
_PR_MD_WRITEV(PRFileDesc *fd, const PRIOVec *iov, PRInt32 iov_size, PRIntervalTime timeout){    int index;    int sent = 0;    int rv;    for (index=0; index < iov_size; index++)     {        rv = _PR_MD_SEND(fd, iov[index].iov_base, iov[index].iov_len, 0, timeout);        if (rv > 0)             sent += rv;        if ( rv != iov[index].iov_len )         {            if (rv < 0)            {                if (fd->secret->nonblocking                    && (PR_GetError() == PR_WOULD_BLOCK_ERROR)                    && (sent > 0))                {                    return sent;                }                else                {                    return -1;                }            }            /* Only a nonblocking socket can have partial sends */            PR_ASSERT(fd->secret->nonblocking);            return sent;        }    }    return sent;}