Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

BOOL PChannel::Read ( const VectorOfSlice &  slices  )  [virtual, inherited]

Low level scattered read from the channel. This is identical to Read except that the data will be read into a series of scattered memory slices. By default, this call will default to calling Read multiple times, but this may be implemented by operating systems to do a real scattered read

Returns:
TRUE indicates that at least one character was read from the channel. FALSE means no bytes were read due to timeout or some other I/O error.

Definition at line 687 of file pchannel.cxx.

References PChannel::lastReadCount, and PChannel::Read().

{
  PINDEX length = 0;

  VectorOfSlice::const_iterator r;
  for (r = slices.begin(); r != slices.end(); ++r) {
    BOOL stat = Read(r->iov_base, r->iov_len);
    length        += lastReadCount;
    lastReadCount = length;
    if (!stat)
      return FALSE;
  }

  return TRUE;
}


Generated by  Doxygen 1.6.0   Back to index