Base class, inherited from "std::iostream", does both input and output, using the specified CONNECTOR.
More...
|
| CConn_IOStream (CONN conn, bool close=false, const STimeout *timeout=kDefaultTimeout, size_t buf_size=kConn_DefaultBufSize, TConn_Flags flags=0, CT_CHAR_TYPE *ptr=0, size_t size=0) |
| Create a stream based on CONN, which is to be closed upon stream dtor but only if "close" parameter is passed as "true". More...
|
|
virtual | ~CConn_IOStream () |
|
string | GetType (void) const |
|
string | GetDescription (void) const |
|
EIO_Status | SetTimeout (EIO_Event direction, const STimeout *timeout) const |
| Set connection timeout for "direction". More...
|
|
const STimeout * | GetTimeout (EIO_Event direction) const |
|
EIO_Status | Status (EIO_Event direction=eIO_Close) const |
|
EIO_Status | Fetch (const STimeout *timeout=kDefaultTimeout) |
| Flush the stream and fetch the response (w/o extracting any user data) More...
|
|
virtual EIO_Status | Pushback (const CT_CHAR_TYPE *data, streamsize size) |
| Push the specified data "data" of size "size" back into the underlying connection CONN (making it look like received yet unread data). More...
|
|
SOCK | GetSOCK (void) |
| Get underlying SOCK, if available (e.g. after Fetch()) More...
|
|
CSocket & | GetSocket (void) |
| Get CSocket, if available (else empty). More...
|
|
virtual EIO_Status | Close (void) |
| Close CONNection, free all internal buffers and underlying structures, and render the stream unusable for further I/O. More...
|
|
EIO_Status | SetCanceledCallback (const ICanceled *canceled) |
| Cancellation support. More...
|
|
CONN | GetCONN (void) const |
|
EIO_Status | Wait (EIO_Event event, const STimeout *timeout=&kZeroTimeout) |
| Equivalent to CONN_Wait(GetCONN(), event, timeout) More...
|
|
Base class, inherited from "std::iostream", does both input and output, using the specified CONNECTOR.
The "buf_size" parameter designates the size of the internal I/O buffers, which reside in between the stream and an underlying connector (which in turn may do further buffering, if needed).
By default, all input operations are tied to the output ones, which means that any input attempt first flushes any pending output from the internal buffers. The fConn_Untie flag can be used to untie the I/O directions.
- Note
- CConn_IOStream implementation utilizes some connection callbacks on the underlying CONN object. Care must be taken when intercepting the callbacks using the native CONN API.
- See also
- CONN_SetCallback
Definition at line 133 of file ncbi_conn_stream.hpp.