fConn_ReadUnbuffered = 4,
145fConn_WriteUnbuffered = 8
221(
constTConnector& connector,
224TConn_Flags
flags= 0,
235 stringGetType(
void)
const;
241 stringGetDescription(
void)
const;
300 SOCKGetSOCK(
void);
338 CONNGetCONN(
void)
const;
357 voidx_Destroy(
void);
492(
const string& host,
494 unsigned shortmax_try,
527(
const string& host,
528 unsigned shortport = 0,
529 const void*
data= 0,
624 const void*
data= 0,
667 const string&
GetHTTPHeader(
void)
const{
returnm_StatusData.m_Header;}
720(
const string& host,
724 unsigned shortport = 0,
731(
const string& url,
738(
const string& url,
747(
const string& url,
751 void* user_data = 0,
763 void* user_data = 0,
774 void SetURL(
const string& url) { m_URL = url; }
790 unsigned int count);
791 static voidsx_Cleanup (
void*
data);
824(
const string& service,
832(
const string& service,
833 const string& user_header,
847 static voidsx_Reset (
void*
data);
850 unsigned int count);
851 static voidsx_Cleanup (
void*
data);
911 voidToVector(vector<char>*);
943(
const string&
cmd,
944 constvector<string>& args,
946 size_tpipe_size = 0,
986(
const string& pipename,
987 size_tpipesize = 0
,
1014(
const string& host,
1015 const string& user,
1016 const string& pass,
1018 unsigned shortport = 0,
1062(
const string& host,
1064 const string& user =
"ftp",
1065 const string& pass =
"-none@",
1067 unsigned shortport = 0,
1095(
const string& host,
1096 const string& user,
1097 const string& pass,
1100 unsigned shortport = 0,
Helper hook-up class that installs default logging/registry/locking (but only if they have not yet be...
CConn_FtpStream specialization (ctor) for download.
CConn_FtpStream specialization (ctor) for upload.
CConn_FtpStream is an elaborate FTP client, can be used for data downloading and/or uploading to and ...
Helper base class for HTTP-like streams.
This stream exchanges data with an HTTP server located at the URL: http[s]://host[:port]/path[?...
const STimeout * GetTimeout(void) const
const STimeout * GetTimeout(void) const
Helper class to build streams on top of CONNECTOR (internal use only).
Base class, inherited from "std::iostream", does both input and output, using the specified CONNECTOR...
In-memory stream (a la strstream or stringstream)
CConn_NamedPipeStream for inter-process communication.
CConn_PipeStream for command piping.
This stream exchanges data with a named service, in a constraint that the service is implemented as o...
This stream exchanges data in a TCP channel, using the SOCK socket API.
CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...
Interface for testing cancellation request in a long lasting operation.
static void cleanup(void)
static CS_CONNECTION * conn
static const struct type types[]
@ eTakeOwnership
An object can take ownership of another.
@ eNoOwnership
No ownership is assumed.
int GetStatusCode(void) const
Get the last seen HTTP status code, if available.
CConn_IOStream & operator<<(CConn_IOStream &os, const CConn_IOStreamSetWriteTimeout &s)
Stream manipulator "os << SetWriteTimeout(timeout)".
SHTTP_StatusData m_StatusData
CConn_IOStreamSetReadTimeout(const STimeout *timeout)
CConn_IOStreamSetWriteTimeout SetWriteTimeout(const STimeout *timeout)
static const STimeout kZeroTimeout
Polling timeout with the 0.0 time in it.
const CTempString GetStatusText(void) const
Get the last seen HTTP status text, if available.
TConnector(CONNECTOR connector, EIO_Status status=eIO_Success)
SHTTP_StatusData(const SHTTP_StatusData &)
FHTTP_Adjust m_UserAdjust
const STimeout * GetTimeout(void) const
CConn_IOStream(const CConn_IOStream &)
const STimeout * m_Timeout
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 loo...
EIO_Status SetTimeout(EIO_Event direction, const STimeout *timeout) const
Set connection timeout for "direction".
pair< CONNECTOR, EIO_Status > TConnPair
friend CConn_IOStreamSetReadTimeout SetReadTimeout(const STimeout *)
CConn_IOStreamSetTimeout(const STimeout *timeout)
CConn_IOStream & operator>>(CConn_IOStream &is, const CConn_IOStreamSetReadTimeout &s)
Stream manipulator "is >> SetReadTimeout(timeout)".
friend CConn_IOStreamSetWriteTimeout SetWriteTimeout(const STimeout *)
const string & GetHTTPHeader(void) const
Get the last seen HTTP header text, if available.
SHTTP_StatusData & operator=(const SHTTP_StatusData &)
CConn_IOStreamSetReadTimeout SetReadTimeout(const STimeout *timeout)
SOCK GetSOCK(void)
Get underlying SOCK, if available (e.g. after Fetch())
int GetExitCode(void) const
A valid exit code is only made available after an explicit Close()
CConn_IOStream * NcbiOpenURL(const string &url, size_t buf_size=kConn_DefaultBufSize)
Given a URL, open the data source and make it available for _reading_.
const void * m_Ptr
pointer to read memory area (if owned)
FHTTP_Cleanup m_UserCleanup
CPipe & GetPipe(void)
Return an underlying CPipe; it's valid for as long as the stream exists.
CConn_HttpStream_Base(const TConnector &connector, const STimeout *timeout, size_t buf_size, TConn_Flags flags=0)
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 loo...
EHTTP_HeaderParse Parse(const char *header)
FHTTP_ParseHeader m_UserParseHeader
CPipe * m_Pipe
Underlying pipe.
CSocket & GetSocket(void)
Get CSocket, if available (else empty).
unique_ptr< CConn_Streambuf > x_CSb
unsigned int TConn_Flags
bitwise OR of EConn_Flag
int m_ExitCode
Process exit code.
const size_t kConn_DefaultBufSize
I/O buffer size per direction.
CConn_IOStreamSetWriteTimeout(const STimeout *timeout)
CConstIRef< ICanceled > m_Canceled
void SetURL(const string &url)
Set new URL to hit next.
unsigned int THTTP_Flags
Bitwise OR of EHTTP_Flag.
int(* FHTTP_Adjust)(SConnNetInfo *net_info, void *user_data, unsigned int failure_count)
unsigned int TCONN_Callback
void(* FHTTP_Cleanup)(void *user_data)
EHTTP_HeaderParse
The extended version HTTP_CreateConnectorEx() is able to track the HTTP response chain and also chang...
EHTTP_HeaderParse(* FHTTP_ParseHeader)(const char *http_header, void *user_data, int server_error)
@ fHTTP_AutoReconnect
See HTTP_CreateConnectorEx()
@ fCONN_Untie
do not call flush method prior to reading
unsigned int TCreateFlags
bitwise OR of "ECreateFlag"
uint64_t Uint8
8-byte (64-bit) unsigned integer
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
unsigned int TSERV_Type
Bitwise OR of ESERV_Type[Special].
void Reset(SOCK sock, EOwnership if_to_own, ECopyTimeout whence)
Close the current underlying "SOCK" (if any, and if owned), and from now on use "sock" as the underly...
unsigned int TSOCK_Flags
bitwise "OR" of ESOCK_Flags
IO_PREFIX::iostream CNcbiIostream
Portable alias for iostream.
void clear(void)
Clears the string.
enum ENcbiOwnership EOwnership
Ownership relations between objects.
EIO_Event
I/O event (or direction).
@ eIO_Success
everything is fine, no error occurred
@ eIO_Unknown
unknown I/O error (likely fatal but can retry)
@ eIO_Close
also serves as an error indicator in SOCK_Poll
#define NCBI_XCONNECT_EXPORT
const struct ncbi::grid::netcache::search::fields::SIZE size
static const STimeout kZeroTimeout
static int x_Pushback(SOCK sock, BUF buf)
Implement CONNECTOR for a named pipe interprocess communication (based on the NCBI CNamedPipe).
Implement CONNECTOR for a pipe interprocess communication (based on the NCBI CPipe).
Helper class to fetch HTTP status code and text.
string ToString(const wxRect &rc)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4