MCPcopy Create free account
hub / github.com/dmtcp/dmtcp / writeOnce

Method writeOnce

jalib/jsocket.cpp:348–361  ·  view source on GitHub ↗

! \fn jalib::JChunkWriter::writeOnce() */

Source from the content-addressed store, hash-verified

346 \fn jalib::JChunkWriter::writeOnce()
347 */
348bool
349jalib::JChunkWriter::writeOnce()
350{
351 if (!isDone()) {
352 ssize_t cnt = _sock.write(_buffer + _sent, _length - _sent);
353 if (cnt <= 0 && errno != EAGAIN && errno != EINTR) {
354 _hadError = true;
355 }
356 if (cnt > 0) {
357 _sent += cnt;
358 }
359 }
360 return isDone();
361}
362
363/*!
364 \fn jalib::JChunkWriter::hadError()

Callers 1

monitorSocketsMethod · 0.80

Calls 1

writeMethod · 0.80

Tested by

no test coverage detected