#include <IO.h>
Definition at line 51 of file IO.h.
Public Types | |
enum | IO_Op_t { READV = 1, RECV, RECVFROM, RECVMSG, WRITEV, SEND, SENDTO, SENDMSG, CONNECT, ACCEPT } |
Op code used by general IO functions. More... | |
Static Public Member Functions | |
static const char * | ioerr2str (int err) |
| |
static int | poll_single (int fd, short events, short *revents, int timeout_ms, Notifier *intr=0, const char *log=0) |
| |
static int | poll_multiple (struct pollfd *fds, int nfds, int timeout_ms, Notifier *intr=0, const char *log=0) |
| |
static size_t | iovec_size (struct iovec *iov, int num) |
| |
static int | poll_with_notifier (Notifier *intr, struct pollfd *fds, size_t nfds, int timeout, const struct timeval *start_time, const char *log) |
Poll on an fd, interruptable by the notifier. | |
static int | rwdata (IO_Op_t op, int fd, const struct iovec *iov, int iovcnt, int flags, int timeout, RwDataExtraArgs *args, const struct timeval *start_time, Notifier *intr, bool ignore_eagain, const char *log) |
This is the do all function which will (depending on the flags given dispatch to the correct read/write/send/rcv call. | |
static int | rwvall (IO_Op_t op, int fd, const struct iovec *iov, int iovcnt, int timeout, const struct timeval *start, Notifier *intr, const char *fcn_name, const char *log) |
Do all function for iovec reading/writing. | |
static int | adjust_timeout (int timeout, const struct timeval *start) |
Adjust the timeout value given a particular start time. | |
static int | open (const char *path, int flags, int *errnop=0, const char *log=0) |
System call wrappers (for logging). | |
static int | open (const char *path, int flags, mode_t mode, int *errnop=0, const char *log=0) |
System call wrappers (for logging). | |
static int | close (int fd, const char *log=0, const char *filename="") |
System call wrappers (for logging). | |
static int | unlink (const char *path, const char *log=0) |
System call wrappers (for logging). | |
static int | lseek (int fd, off_t offset, int whence, const char *log=0) |
System call wrappers (for logging). | |
static int | truncate (int fd, off_t length, const char *log=0) |
System call wrappers (for logging). | |
static int | mkstemp (char *templ, const char *log=0) |
System call wrappers (for logging). | |
static int | stat (const char *path, struct stat *buf, const char *log=0) |
System call wrappers (for logging). | |
static int | lstat (const char *path, struct stat *buf, const char *log=0) |
System call wrappers (for logging). | |
static int | read (int fd, char *bp, size_t len, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | readv (int fd, const struct iovec *iov, int iovcnt, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | readall (int fd, char *bp, size_t len, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | readvall (int fd, const struct iovec *iov, int iovcnt, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_read (int fd, char *bp, size_t len, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_readv (int fd, const struct iovec *iov, int iovcnt, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_readall (int fd, char *bp, size_t len, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_readvall (int fd, const struct iovec *iov, int iovcnt, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | recv (int fd, char *bp, size_t len, int flags, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | recvfrom (int fd, char *bp, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | recvmsg (int fd, struct msghdr *msg, int flags, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | write (int fd, const char *bp, size_t len, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | writev (int fd, const struct iovec *iov, int iovcnt, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | writeall (int fd, const char *bp, size_t len, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | writevall (int fd, const struct iovec *iov, int iovcnt, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_write (int fd, const char *bp, size_t len, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_writev (int fd, const struct iovec *iov, int iovcnt, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_writeall (int fd, const char *bp, size_t len, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | timeout_writevall (int fd, const struct iovec *iov, int iovcnt, int timeout_ms, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | send (int fd, const char *bp, size_t len, int flags, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | sendto (int fd, char *bp, size_t len, int flags, const struct sockaddr *to, socklen_t tolen, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | sendmsg (int fd, const struct msghdr *msg, int flags, Notifier *intr=0, const char *log=0) |
XXX/bowei - more documentation. | |
static int | get_nonblocking (int fd, bool *nonblocking, const char *log=NULL) |
Get and Set the file descriptor's nonblocking status. | |
static int | set_nonblocking (int fd, bool nonblocking, const char *log=NULL) |
Get and Set the file descriptor's nonblocking status. | |
Classes | |
union | RwDataExtraArgs |
Union used to pass extra arguments to rwdata. More... |
enum oasys::IO::IO_Op_t |
const char * oasys::IO::ioerr2str | ( | int | err | ) | [static] |
Definition at line 130 of file IO.cc.
References oasys::IOEOF, oasys::IOERROR, oasys::IOINTR, oasys::IOTIMEOUT, and NOTREACHED.
Referenced by rwvall().
int oasys::IO::open | ( | const char * | path, | |
int | flags, | |||
int * | errnop = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 144 of file IO.cc.
References errno, fd, oasys::LOG_DEBUG, and oasys::logf().
Referenced by open(), oasys::FileIOClient::open(), and oasys::FileIOClient::reopen().
int oasys::IO::open | ( | const char * | path, | |
int | flags, | |||
mode_t | mode, | |||
int * | errnop = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 157 of file IO.cc.
References errno, fd, oasys::LOG_DEBUG, oasys::logf(), and open().
int oasys::IO::close | ( | int | fd, | |
const char * | log = 0 , |
|||
const char * | filename = "" | |||
) | [static] |
System call wrappers (for logging).
Definition at line 172 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::OpenFdCacheClose::close(), oasys::FileIOClient::close(), oasys::FileSystemTable::get_common(), and oasys::FileSystemTable::put().
int oasys::IO::unlink | ( | const char * | path, | |
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 183 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileIOClient::unlink().
int oasys::IO::lseek | ( | int | fd, | |
off_t | offset, | |||
int | whence, | |||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 195 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileSystemTable::get_common(), oasys::FileIOClient::lseek(), and oasys::FileSystemTable::put().
int oasys::IO::truncate | ( | int | fd, | |
off_t | length, | |||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 213 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileIOClient::truncate().
int oasys::IO::mkstemp | ( | char * | templ, | |
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 225 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileIOClient::mkstemp().
int oasys::IO::stat | ( | const char * | path, | |
struct stat * | buf, | |||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 237 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileIOClient::stat().
int oasys::IO::lstat | ( | const char * | path, | |
struct stat * | buf, | |||
const char * | log = 0 | |||
) | [static] |
System call wrappers (for logging).
Definition at line 249 of file IO.cc.
References oasys::LOG_DEBUG, and oasys::logf().
Referenced by oasys::FileIOClient::lstat().
int oasys::IO::read | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 261 of file IO.cc.
References READV, and rwdata().
Referenced by oasys::Notifier::drain_pipe(), oasys::FileSystemTable::get_common(), oasys::IPClient::read(), oasys::FdIOClient::read(), and oasys::BluetoothClient::read().
int oasys::IO::readv | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 272 of file IO.cc.
References READV, and rwdata().
Referenced by oasys::IPClient::readv(), oasys::FdIOClient::readv(), oasys::BluetoothClient::readv(), and rwdata().
int oasys::IO::readall | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 280 of file IO.cc.
References READV, and rwvall().
Referenced by oasys::IPClient::readall(), oasys::FdIOClient::readall(), and oasys::BluetoothClient::readall().
int oasys::IO::readvall | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 292 of file IO.cc.
References READV, and rwvall().
Referenced by oasys::IPClient::readvall(), oasys::FdIOClient::readvall(), and oasys::BluetoothClient::readvall().
int oasys::IO::timeout_read | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 301 of file IO.cc.
References dtnsim::gettimeofday(), READV, and rwdata().
Referenced by oasys::IPClient::timeout_read(), oasys::FdIOClient::timeout_read(), and oasys::BluetoothClient::timeout_read().
int oasys::IO::timeout_readv | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 317 of file IO.cc.
References dtnsim::gettimeofday(), READV, and rwdata().
Referenced by oasys::IPClient::timeout_readv(), oasys::FdIOClient::timeout_readv(), and oasys::BluetoothClient::timeout_readv().
int oasys::IO::timeout_readall | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 329 of file IO.cc.
References dtnsim::gettimeofday(), READV, and rwvall().
Referenced by oasys::IPClient::timeout_readall(), oasys::FdIOClient::timeout_readall(), and oasys::BluetoothClient::timeout_readall().
int oasys::IO::timeout_readvall | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 345 of file IO.cc.
References dtnsim::gettimeofday(), READV, and rwvall().
Referenced by oasys::IPClient::timeout_readvall(), oasys::FdIOClient::timeout_readvall(), and oasys::BluetoothClient::timeout_readvall().
int oasys::IO::recv | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
int | flags, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 357 of file IO.cc.
References RECV, and rwdata().
Referenced by oasys::IPSocket::recv(), oasys::BluetoothSocket::recv(), and rwdata().
int oasys::IO::recvfrom | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
int | flags, | |||
struct sockaddr * | from, | |||
socklen_t * | fromlen, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 368 of file IO.cc.
References oasys::IO::RwDataExtraArgs::from, oasys::IO::RwDataExtraArgs::fromlen, RECVFROM, oasys::IO::RwDataExtraArgs::recvfrom, and rwdata().
Referenced by oasys::IPSocket::recvfrom(), and rwdata().
int oasys::IO::recvmsg | ( | int | fd, | |
struct msghdr * | msg, | |||
int | flags, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 385 of file IO.cc.
References oasys::IO::RwDataExtraArgs::msg_hdr, RECVMSG, and rwdata().
Referenced by oasys::IPSocket::recvmsg().
int oasys::IO::write | ( | int | fd, | |
const char * | bp, | |||
size_t | len, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 397 of file IO.cc.
References rwdata(), and WRITEV.
Referenced by oasys::IPClient::write(), oasys::FdIOClient::write(), and oasys::BluetoothClient::write().
int oasys::IO::writev | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 409 of file IO.cc.
References rwdata(), and WRITEV.
Referenced by rwdata(), oasys::IPClient::writev(), oasys::FdIOClient::writev(), and oasys::BluetoothClient::writev().
int oasys::IO::writeall | ( | int | fd, | |
const char * | bp, | |||
size_t | len, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 418 of file IO.cc.
References rwvall(), and WRITEV.
Referenced by oasys::FileSystemTable::put(), oasys::Log::vlogf(), oasys::IPClient::writeall(), oasys::FdIOClient::writeall(), and oasys::BluetoothClient::writeall().
int oasys::IO::writevall | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 430 of file IO.cc.
References rwvall(), and WRITEV.
Referenced by oasys::Log::log_multiline(), dtn::FileConvergenceLayer::send_bundle(), oasys::IPClient::writevall(), oasys::FdIOClient::writevall(), and oasys::BluetoothClient::writevall().
int oasys::IO::timeout_write | ( | int | fd, | |
const char * | bp, | |||
size_t | len, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 438 of file IO.cc.
References rwdata(), and WRITEV.
Referenced by oasys::IPClient::timeout_write(), oasys::FdIOClient::timeout_write(), and oasys::BluetoothClient::timeout_write().
int oasys::IO::timeout_writev | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 450 of file IO.cc.
References rwdata(), and WRITEV.
Referenced by oasys::IPClient::timeout_writev(), oasys::FdIOClient::timeout_writev(), and oasys::BluetoothClient::timeout_writev().
int oasys::IO::timeout_writeall | ( | int | fd, | |
const char * | bp, | |||
size_t | len, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 459 of file IO.cc.
References dtnsim::gettimeofday(), rwvall(), and WRITEV.
Referenced by oasys::IPClient::timeout_writeall(), oasys::FdIOClient::timeout_writeall(), and oasys::BluetoothClient::timeout_writeall().
int oasys::IO::timeout_writevall | ( | int | fd, | |
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 475 of file IO.cc.
References dtnsim::gettimeofday(), rwvall(), and WRITEV.
Referenced by oasys::IPClient::timeout_writevall(), oasys::FdIOClient::timeout_writevall(), and oasys::BluetoothClient::timeout_writevall().
int oasys::IO::send | ( | int | fd, | |
const char * | bp, | |||
size_t | len, | |||
int | flags, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 487 of file IO.cc.
References rwdata(), and SEND.
Referenced by rwdata(), oasys::IPSocket::send(), and oasys::BluetoothSocket::send().
int oasys::IO::sendto | ( | int | fd, | |
char * | bp, | |||
size_t | len, | |||
int | flags, | |||
const struct sockaddr * | to, | |||
socklen_t | tolen, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 498 of file IO.cc.
References rwdata(), SENDTO, oasys::IO::RwDataExtraArgs::sendto, oasys::IO::RwDataExtraArgs::to, and oasys::IO::RwDataExtraArgs::tolen.
Referenced by rwdata(), and oasys::IPSocket::sendto().
int oasys::IO::sendmsg | ( | int | fd, | |
const struct msghdr * | msg, | |||
int | flags, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
XXX/bowei - more documentation.
Definition at line 516 of file IO.cc.
References oasys::IO::RwDataExtraArgs::msg_hdr, rwdata(), and SENDMSG.
Referenced by rwdata(), and oasys::IPSocket::sendmsg().
int oasys::IO::poll_single | ( | int | fd, | |
short | events, | |||
short * | revents, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
Definition at line 528 of file IO.cc.
References poll_multiple().
Referenced by oasys::IPSocket::poll_sockfd(), oasys::BluetoothSocket::poll_sockfd(), dtn::ProphetEncounter::run(), oasys::TCPClient::timeout_connect(), oasys::OnOffNotifier::wait(), and oasys::Notifier::wait().
int oasys::IO::poll_multiple | ( | struct pollfd * | fds, | |
int | nfds, | |||
int | timeout_ms, | |||
Notifier * | intr = 0 , |
|||
const char * | log = 0 | |||
) | [static] |
Definition at line 545 of file IO.cc.
References ASSERT, dtnsim::gettimeofday(), and poll_with_notifier().
Referenced by poll_single(), dtntunnel::TCPTunnel::Connection::run(), dtn::CLConnection::run(), dtn::BundleDaemon::run(), and dtn::APIClient::wait_for_bundle().
int oasys::IO::get_nonblocking | ( | int | fd, | |
bool * | nonblocking, | |||
const char * | log = NULL | |||
) | [static] |
Get and Set the file descriptor's nonblocking status.
Read/Write in the entire supplied buffer, potentially ! requiring multiple system calls
Definition at line 565 of file IO.cc.
References ASSERT, errno, and log_debug_p.
Referenced by oasys::IPClient::get_nonblocking(), oasys::FdIOClient::get_nonblocking(), and oasys::BluetoothClient::get_nonblocking().
int oasys::IO::set_nonblocking | ( | int | fd, | |
bool | nonblocking, | |||
const char * | log = NULL | |||
) | [static] |
Get and Set the file descriptor's nonblocking status.
Read/Write in the entire supplied buffer, potentially ! requiring multiple system calls
Definition at line 584 of file IO.cc.
References errno, and log_debug_p.
Referenced by oasys::Notifier::Notifier(), oasys::OnOffNotifier::OnOffNotifier(), oasys::IPClient::set_nonblocking(), oasys::FdIOClient::set_nonblocking(), oasys::BluetoothClient::set_nonblocking(), and oasys::TCPClient::timeout_connect().
static size_t oasys::IO::iovec_size | ( | struct iovec * | iov, | |
int | num | |||
) | [inline, static] |
int oasys::IO::poll_with_notifier | ( | Notifier * | intr, | |
struct pollfd * | fds, | |||
size_t | nfds, | |||
int | timeout, | |||
const struct timeval * | start_time, | |||
const char * | log | |||
) | [static] |
Poll on an fd, interruptable by the notifier.
Definition at line 625 of file IO.cc.
References adjust_timeout(), oasys::StringBuffer::appendf(), ASSERT, oasys::StringBuffer::c_str(), oasys::Notifier::drain_pipe(), errno, oasys::IOERROR, oasys::IOINTR, oasys::IOTIMEOUT, oasys::LOG_DEBUG, log_debug_p, log_warn_p, oasys::logf(), NOTREACHED, and oasys::Notifier::read_fd().
Referenced by poll_multiple(), and rwdata().
int oasys::IO::rwdata | ( | IO_Op_t | op, | |
int | fd, | |||
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | flags, | |||
int | timeout, | |||
RwDataExtraArgs * | args, | |||
const struct timeval * | start_time, | |||
Notifier * | intr, | |||
bool | ignore_eagain, | |||
const char * | log | |||
) | [static] |
This is the do all function which will (depending on the flags given dispatch to the correct read/write/send/rcv call.
Definition at line 775 of file IO.cc.
References adjust_timeout(), ASSERT, errno, oasys::IO::RwDataExtraArgs::from, oasys::IO::RwDataExtraArgs::fromlen, oasys::IOAGAIN, oasys::IOEOF, oasys::IOERROR, oasys::IOINTR, oasys::IOTIMEOUT, log_debug_p, oasys::IO::RwDataExtraArgs::msg_hdr, NOTREACHED, poll_with_notifier(), readv(), READV, recv(), RECV, oasys::IO::RwDataExtraArgs::recvfrom, recvfrom(), RECVFROM, RECVMSG, send(), SEND, sendmsg(), SENDMSG, oasys::IO::RwDataExtraArgs::sendto, sendto(), SENDTO, oasys::IO::RwDataExtraArgs::to, oasys::IO::RwDataExtraArgs::tolen, writev(), and WRITEV.
Referenced by read(), readv(), recv(), recvfrom(), recvmsg(), rwvall(), send(), sendmsg(), sendto(), timeout_read(), timeout_readv(), timeout_write(), timeout_writev(), write(), and writev().
int oasys::IO::rwvall | ( | IO_Op_t | op, | |
int | fd, | |||
const struct iovec * | iov, | |||
int | iovcnt, | |||
int | timeout, | |||
const struct timeval * | start, | |||
Notifier * | intr, | |||
const char * | fcn_name, | |||
const char * | log | |||
) | [static] |
Do all function for iovec reading/writing.
Definition at line 897 of file IO.cc.
References adjust_timeout(), ASSERT, oasys::COWIoVec::bytes_left(), oasys::COWIoVec::consume(), errno, oasys::IOEOF, ioerr2str(), oasys::IOINTR, oasys::IOTIMEOUT, oasys::COWIoVec::iov(), oasys::COWIoVec::iovcnt(), log_debug_p, READV, rwdata(), and WRITEV.
Referenced by readall(), readvall(), timeout_readall(), timeout_readvall(), timeout_writeall(), timeout_writevall(), writeall(), and writevall().
int oasys::IO::adjust_timeout | ( | int | timeout, | |
const struct timeval * | start | |||
) | [static] |
Adjust the timeout value given a particular start time.
Definition at line 951 of file IO.cc.
References ASSERT, and dtnsim::gettimeofday().
Referenced by poll_with_notifier(), rwdata(), and rwvall().