Socket reader-writer
[CONNECT]

Collaboration diagram for Socket reader-writer:


Classes

class  CSocketReaderWriter

Functions

 CSocketReaderWriter::CSocketReaderWriter (CSocket *sock, EOwnership if_to_own=eNoOwnership)
virtual CSocketReaderWriter::~CSocketReaderWriter ()
virtual ERW_Result CSocketReaderWriter::Read (void *buf, size_t count, size_t *bytes_read=0)
 Read as many as "count" bytes into a buffer pointed to by "buf" argument.
virtual ERW_Result CSocketReaderWriter::Write (const void *buf, size_t count, size_t *bytes_written=0)
 Write up to "count" bytes from the buffer pointed to by "buf" argument onto output device.
const STimeoutCSocketReaderWriter::GetTimeout (EIO_Event event) const
ERW_Result CSocketReaderWriter::SetTimeout (EIO_Event event, const STimeout *timeout)


Function Documentation

CSocketReaderWriter::CSocketReaderWriter CSocket sock,
EOwnership  if_to_own = eNoOwnership
[inline, inherited]
 

Definition at line 86 of file ncbi_conn_reader_writer.hpp.

const STimeout * CSocketReaderWriter::GetTimeout EIO_Event  event  )  const [inline, inherited]
 

Definition at line 121 of file ncbi_conn_reader_writer.hpp.

References CSocket::GetTimeout(), and CSocketReaderWriter::m_Sock.

ERW_Result CSocketReaderWriter::Read void *  buf,
size_t  count,
size_t *  bytes_read = 0
[inline, virtual, inherited]
 

Read as many as "count" bytes into a buffer pointed to by "buf" argument.

Store the number of bytes actually read, or 0 on EOF or error, via the pointer "bytes_read", if provided. Special case: if "count" passed as 0, then the value of "buf" is ignored, and the return value is always eRW_Success, but no change should be actually made to the state of input device.

Implements IReader.

Definition at line 101 of file ncbi_conn_reader_writer.hpp.

References eIO_ReadPlain, eRW_Error, CSocketReaderWriter::m_Sock, CSocket::Read(), and CSocketReaderWriter::x_Result().

ERW_Result CSocketReaderWriter::SetTimeout EIO_Event  event,
const STimeout timeout
[inline, inherited]
 

Definition at line 127 of file ncbi_conn_reader_writer.hpp.

References eRW_Error, CSocketReaderWriter::m_Sock, CSocket::SetTimeout(), and CSocketReaderWriter::x_Result().

ERW_Result CSocketReaderWriter::Write const void *  buf,
size_t  count,
size_t *  bytes_written = 0
[inline, virtual, inherited]
 

Write up to "count" bytes from the buffer pointed to by "buf" argument onto output device.

Store the number of bytes actually written, or 0 if "count" has been passed as 0 ("buf" is ignored in this case), via the "bytes_written" pointer, if provided non-NULL.

Implements IWriter.

Definition at line 111 of file ncbi_conn_reader_writer.hpp.

References eRW_Error, CSocketReaderWriter::m_Sock, CSocket::Write(), and CSocketReaderWriter::x_Result().

CSocketReaderWriter::~CSocketReaderWriter  )  [inline, virtual, inherited]
 

Definition at line 93 of file ncbi_conn_reader_writer.hpp.

References CSocketReaderWriter::m_IsOwned, and CSocketReaderWriter::m_Sock.


Generated on Mon Dec 7 16:02:02 2009 for NCBI C++ ToolKit by  doxygen 1.4.6
Modified on Mon Dec 07 16:24:35 2009 by modify_doxy.py rev. 173732