do { \
} else if (timeout) { \
meta->default_tmo = *timeout; \
meta->default_timeout = &meta->default_tmo; \
} else \
} while (0)
const STimeout g_NcbiDefConnTimeout
DEF_CONN_TIMEOUT as STimeout.
Definition at line 215 of file ncbi_connector.h.
◆ CONN_SET_METHOD #define CONN_SET_METHOD ( meta, method, function, connector ) Value:do { \
meta->method = function; \
meta->c_##method = connector; \
} while (0)
Definition at line 208 of file ncbi_connector.h.
◆ SERVICE_CreateConnector ◆ CONN ◆ CONNECTOR ◆ FCONN_Callback ◆ FConnectorCloseClose data link (if any) and cleanup related data structures.
Definition at line 181 of file ncbi_connector.h.
◆ FConnectorDescr typedef char*(* FConnectorDescr) (CONNECTOR connector)Get the human readable connector's description (may be NULL on error)
Definition at line 82 of file ncbi_connector.h.
◆ FConnectorFlush ◆ FConnectorGetTypeGet the name of the connector (may NOT be NULL)
Definition at line 75 of file ncbi_connector.h.
◆ FConnectorOpenOpen connection.
Used to setup all related data structures, but not necessarily has to actually open the data channel.
Definition at line 92 of file ncbi_connector.h.
◆ FConnectorReadRead from connector.
The passed "n_read" is always non-NULL, and "*n_read" is always zero. Upon return, the number of bytes actually read must get reflected in "*n_read", and it may never be greater than "size".
Definition at line 152 of file ncbi_connector.h.
◆ FConnectorStatusObtain last I/O completion code from the transport level (connector).
Definition at line 168 of file ncbi_connector.h.
◆ FConnectorWaitWait until either read or write (depending on the "event" value) becomes available, or until "timeout" expires, or until error occurs.
Definition at line 104 of file ncbi_connector.h.
◆ FConnectorWriteWrite to connector.
The passed "n_written" is always non-NULL, and "*n_written" is always zero. Upon return, the number of bytes actually written must get reflected in "*n_written", and it may never be greater than "size".
Definition at line 120 of file ncbi_connector.h.
◆ FDestroy typedef void(* FDestroy) (CONNECTOR connector)Destroy connector and its data handle.
This is NOT a close request! Should not to be used on open connectors (that is, for those FConnectorClose must be called prior to this call).
Definition at line 258 of file ncbi_connector.h.
◆ FFTP_Callback ◆ FHTTP_Adjust typedef int(* FHTTP_Adjust) (SConnNetInfo *net_info, void *user_data, unsigned int failure_count)Definition at line 248 of file ncbi_http_connector.h.
◆ FHTTP_Cleanup typedef void(* FHTTP_Cleanup) (void *user_data) ◆ FHTTP_NcbiMessageHook ◆ FHTTP_ParseHeaderDefinition at line 236 of file ncbi_http_connector.h.
◆ FSERVICE_Cleanup ◆ FSERVICE_GetNextInfo ◆ FSERVICE_Reset ◆ FSetupVTable typedef void(* FSetupVTable) (CONNECTOR connector)Upcall on request to setup virtual function table (called from connection).
NB: May not detect any failures (follow up in Open to fail if necessary).
Definition at line 249 of file ncbi_connector.h.
◆ SConnector ◆ TCONN_Callback ◆ TCONN_Flags ◆ TFTP_Flags ◆ THCC_Flags ◆ THTTP_Flags ◆ ECONN_CallbackSet user callback function to be invoked upon an event specified by the callback type.
Note that the callback function gets always called prior to the event to happen, e.g. the eCONN_OnClose callback is called when the connection is about to close, but has not yet been closed.
NB: CONN has been flushed prior to the call.
eCONN_OnReadRead from CONNECTOR is about to occur.
eCONN_OnWriteWrite to CONNECTOR is about to occur.
eCONN_OnFlushAbout to be flushed (NB: == eIO_ReadWrite)
eCONN_OnTimeoutCONNECTOR I/O has timed out.
eCONN_OnOpenCall prior to open (NB: "conn" still closed)
Definition at line 470 of file ncbi_connection.h.
◆ ECONN_FlagCONN flags should be kept compatible with CConn_IOStream::TConn_Flags.
Enumerator fCONN_Untiedo not call flush method prior to reading
fCONN_Supplementsupplement I/O with extended return codes
Definition at line 69 of file ncbi_connection.h.
◆ EFILE_ConnMode ◆ EFTP_Flag Enumerator fFTP_LogControl fFTP_LogData fFTP_LogAll fFTP_UseFeatures fFTP_NotifySize fFTP_UsePassive fFTP_UseActive fFTP_UseTypeL8 fFTP_UncleanIAC fFTP_IgnorePath fFTP_UncorkUpload fFTP_NoSizeChecks fFTP_NoExtensions fFTP_DelayRestart fFTP_UseProxyDefinition at line 53 of file ncbi_ftp_connector.h.
◆ EHCC_FlagDEPRECATED, do not use!
Enumerator fHCC_UrlEncodeArgsNB: Error-prone semantics, do not use!
fHCC_UrlDecodeInputObsolete, may not work, do not use!
Assume the response body as single-part, URL-encoded; perform the URL-decoding on read, and deliver decoded data to the user.
Obsolete!
fHCC_UrlEncodeOutputObsolete, may not work, do not use!
fHCC_UrlCodecfHCC_UrlDecodeInput | ...EncodeOutput
Definition at line 148 of file ncbi_http_connector.h.
◆ EHTTP_Flag Enumerator fHTTP_AutoReconnect fHTTP_FlushableConnector will really flush on Flush()
HTTP connector flags.
HTTP/1.0 or when fHTTP_WriteThru is not set: by default all data written to the connection are kept until read begins (even though CONN_Flush() might have been called in between the writes); with this flag set, CONN_Flush() will result the data to be actually sent to the server side, so the following write will form a new request, and not get added to the previous one; also this flag assures that the connector sends at least an HTTP header on "CLOSE" and re-"CONNECT", even if no data for HTTP body have been written.
HTTP/1.1 and when fHTTP_WriteThru is set: CONN_Flush() attempts to send all pending data down to server.
fHTTP_KeepHeaderKeep HTTP header (see limitations)
Do not strip HTTP header (i.e.
everything up to the first "\r\n\r\n", including the "\r\n\r\n") from the incomning HTTP response (including any server error, which then is made available for reading as well). *NOTE* this flag disables automatic authorization and redirection.
fHTTP_PushAuthHTTP/1.1 pushes out auth if present.
Present credentials to the server if they are set in the connection parameters when sending 1st request.
Normally, the credentials are only presented on a retry when the server rejects the initial request with 401 / 407. This saves a hit, but is only honored with HTTP/1.1.
fHTTP_WriteThruHTTP/1.1 writes through (chunked)
Valid only with HTTP/1.1: Connection to the server is made upon a first CONN_Write(), or CONN_Flush() if fHTTP_Flushable is set, or CONN_Wait(eIO_Write), and each CONN_Write() forms a chunk of HTTP data to be sent to the server.
Reading / waiting for read from the connector finalizes the body and, if reading, fetches the response.
fHTTP_NoUpreadDo not use SOCK_SetReadOnWrite()
Do *not* do internal reading into temporary buffer while sending data to HTTP server; by default any send operation tries to fetch data as they are coming back from the server in order to prevent stalling due to data clogging the connection.
fHTTP_DropUnreadEach microsession drops unread data.
Do not collect incoming data in "Read" mode before switching into "Write" mode for preparing next request; by default all data sent by the server get stored even if not all of it have been requested prior to a "Write" that followed data reading (stream emulation).
fHTTP_NoAutoRetryNo auto-retries allowed.
Do not attempt any auto-retries in case of failing connections (this flag effectively overrides SConnNetInfo::max_try with 1).
fHTTP_NoAutomagicSIDDo not add NCBI SID automagically.
fHTTP_UnsafeRedirectsAny redirect will be honored.
For security reasons the following redirects comprise security risk, and thus, are prohibited: switching from https to http, and/or re-POSTing data (regardless of the transport, either http or https); this flag allows such redirects (when encountered) to be honored.
Call adjust routine for redirects, too.
fHTTP_SuppressMessagesMost annoying ones reduced to traces.
Definition at line 127 of file ncbi_http_connector.h.
◆ EHTTP_HeaderParseThe extended version HTTP_CreateConnectorEx() is able to track the HTTP response chain and also change the URL of the server "on-the-fly":
FHTTP_ParseHeader() gets called every time a new HTTP response header is received from the server, and only if fHTTP_KeepHeader is NOT set. Return code from the parser adjusts the existing server error condition (if any) as the following:
+ eHTTP_HeaderError: unconditionally flag a server error; + eHTTP_HeaderSuccess: header parse successful, retain existing condition (note that in case of an already existing server error condition the response body can be logged but will not be made available for the user code to read, and eIO_Unknown will result on read); + eHTTP_HeaderContinue: if there was already a server error condition, the response body will be made available for the user code to read (but only if HTTP connector cannot post-process the request such as for redirects, authorization etc); otherwise, this code has the same effect as eHTTP_HeaderSuccess; + eHTTP_HeaderComplete: flag this request as processed completely, and do not do any post-processing (such as redirects, authorization etc), yet make the response body (if any, and regardless of whether there was a server error or not) available for reading.
Parse failed, treat as a server error.
eHTTP_HeaderSuccessParse succeeded, retain server status.
eHTTP_HeaderContinueParse succeeded, continue with body.
eHTTP_HeaderCompleteParse succeeded, no more processing.
Definition at line 230 of file ncbi_http_connector.h.
◆ CONN_Close()Close the connection and destroy all relevant internal data.
Definition at line 1198 of file ncbi_connection.c.
References BUF_Destroy(), conn, CONN_NOT_NULL, eIO_Success, free(), and x_ReInit().
Referenced by s_Open(), s_Resolve(), CConn_Streambuf::x_Close(), and x_LoadLocalIPs().
◆ CONN_Create() ◆ CONN_CreateEx()Create all data necessary to establish a new connection (merely bind it to the specified CONNECTOR).
Unsuccessful completion sets "*conn" to NULL, and leaves "connector" intact (can be used again).
Definition at line 448 of file ncbi_connection.c.
References assert, calloc(), conn, CONN_CALLTRACE, CONN_LOG, CONN_N_CALLBACKS, CONNECTION_MAGIC, eCONN_Unusable, eIO_InvalidArg, eIO_Success, eIO_Unknown, eLOG_Error, fCONN_Flush, flags, free(), int, kDefaultTimeout, x_CatchallCallback(), and x_ReInit().
Referenced by CConn_Streambuf::CConn_Streambuf(), and CONN_Create().
◆ CONN_Description() char* CONN_Description ( CONN conn ) ◆ CONN_Flush()Explicitly flush connection from any pending data written by CONN_Write().
Definition at line 872 of file ncbi_connection.c.
References assert, conn, CONN_LOG, CONN_NOT_NULL, eCONN_Open, eIO_Success, eIO_Timeout, eLOG_Trace, eLOG_Warning, kDefaultTimeout, s_Open(), and x_Flush().
Referenced by CConn_Streambuf::overflow(), s_Open(), and s_Resolve().
◆ CONN_GetFlags() ◆ CONN_GetPosition()Get read ("event" == eIO_Read) or write ("event" == eIO_Write) position within the connection.
Positions are advanced from 0 on, for every successive byte of data, and only consider I/O that has caused calling the actual CONNECTOR's "read" (i.e. pushbacks never counted, and peeks – not always) and "write" methods. Special case: eIO_Open as "event" causes to clear *both* positions with 0, and to return 0.
Definition at line 527 of file ncbi_connection.c.
References assert, conn, CONN_LOG_EX, CONN_NOT_NULL_EX, eCONN_Unusable, eIO_Open, eIO_Read, eIO_Write, and eLOG_Error.
Referenced by s_FtpCallback(), CDownloadJob::x_Download(), and CDownloadJob::x_DownloadAndExtract().
◆ CONN_GetSOCK()Get an underlying SOCK handle for connection that is implemented as a socket.
Non-eIO_Success return code guarantees "*sock" is NULL. Set "*sock" to NULL when no socket handle can be obtained.
Definition at line 1245 of file ncbi_connection.c.
References assert, SMetaConnector::c_get_type, conn, CONN_NOT_NULL, eCONN_Open, eIO_InvalidArg, eIO_Success, g_kNcbiSockNameAbbr, SMetaConnector::get_type, SConnectorTag::handle, if(), SConnectorTag::meta, s_Open(), and util::strcmp().
Referenced by CRPCClient< TRequest, TReply >::AsyncConnect(), CConn_IOStream::GetSOCK(), and CConn_Streambuf::x_Init().
◆ CONN_GetTimeout()Retrieve current timeout, return NULL(kInfiniteTimeout) if it is infinite.
Definition at line 614 of file ncbi_connection.c.
References assert, conn, CONN_LOG_EX, CONN_NOT_NULL_EX, eIO_Close, eIO_Open, eIO_Read, eIO_ReadWrite, eIO_Write, eLOG_Error, and eLOG_Warning.
Referenced by CConn_FtpStream::Drain(), CConn_Streambuf::Fetch(), CConn_IOStream::GetTimeout(), CConn_Streambuf::overflow(), CConn_Streambuf::showmanyc(), CConn_Streambuf::underflow(), CConn_Streambuf::x_Close(), CConn_Streambuf::x_Read(), and CConn_Streambuf::xsputn().
◆ CONN_GetType() ◆ CONN_GetUserData() void* CONN_GetUserData ( CONN conn )Get current value of the user's data pointer last associated with the connection, or NULL (if CONN is NULL or no pointer is currently set).
Definition at line 1314 of file ncbi_connection.c.
References conn, and CONN_CALLTRACE.
◆ CONN_Pushback()Push "size" bytes from the buffer "data" back into connection.
Return eIO_Success on success (including when pushing back nothing if "size" is zero – the "data" pointer is ignored then), other code on error.
Definition at line 847 of file ncbi_connection.c.
References assert, BUF_Pushback(), conn, CONN_NOT_NULL, data, eCONN_Canceled, eCONN_Open, eCONN_Unusable, eIO_Interrupt, eIO_InvalidArg, eIO_Success, eIO_Unknown, and ncbi::grid::netcache::search::fields::size.
Referenced by CConn_Streambuf::Pushback(), s_CONN_IO(), and CConn_Streambuf::x_Pushback().
◆ CONN_Read()Definition at line 1031 of file ncbi_connection.c.
References assert, buf, conn, CONN_NOT_NULL, eCONN_Open, eIO_InvalidArg, eIO_NotSupported, eIO_ReadPeek, eIO_ReadPersist, eIO_ReadPlain, eIO_Success, eIO_Unknown, fCONN_Supplement, Read(), s_CONN_Read(), s_CONN_ReadPersist(), s_Open(), and ncbi::grid::netcache::search::fields::size.
Referenced by CConnTest::CheckFWConnections(), CConn_FtpStream::Drain(), s_AsnRead(), s_CONN_IO(), s_ReadFullResponse(), CConn_Streambuf::showmanyc(), CConn_Streambuf::underflow(), and CConn_Streambuf::x_Read().
◆ CONN_ReadLine() EIO_Status CONN_ReadLine ( CONN conn, char * line, size_t size, size_t * n_read )Read up to "size" bytes from connection into a string buffer pointed to by "line".
Stop reading if either '
' or an error is encountered. Replace '
' with '\0'. Upon return, "*n_read" contains the number of characters stored in "line", not including the terminating '\0'. If there was not enough space provided in "line" to accomodate the '\0'-termination, then all "size" bytes are used up, and "*n_read" is equal to "size" upon return - this is the _only_ case when "line" is _not_ be '\0'-terminated.
Return code advises the caller whether another read can be attempted: * eIO_Success – read completed successfully ('
' is seen or the buffer has been filled up completely), keep reading; * other code – an error occurred, and further read attempt may fail.
This call utilizes eIO_Read timeout as set by CONN_SetTimeout().
Definition at line 1076 of file ncbi_connection.c.
References assert, BUF_Pushback(), BUF_Size(), conn, CONN_LOG_EX, CONN_NOT_NULL, done, eCONN_Corrupt, eCONN_Open, eIO_InvalidArg, eIO_Success, eIO_Unknown, eLOG_Critical, fCONN_Supplement, i, len, ReadLine(), s_CONN_Read(), s_Open(), ncbi::grid::netcache::search::fields::size, and x_size().
Referenced by xx_LoadLocalIPs().
◆ CONN_ReInit()Reinit using new "connector".
If "conn" is already opened, then close the current connection first, even if "connector" is just the same as the current CONNECTOR. If "connector" is NULL, then close and destroy the incumbent, and leave the connection empty (effective way to destroy CONNECTOR(s)).
Definition at line 497 of file ncbi_connection.c.
References conn, CONN_NOT_NULL, and x_ReInit().
◆ CONN_SetCallback()Definition at line 1214 of file ncbi_connection.c.
References assert, conn, CONN_LOG_EX, CONN_N_CALLBACKS, CONN_NOT_NULL, eIO_InvalidArg, eIO_Success, eLOG_Critical, and x_CB2IDX().
Referenced by s_AsnSetCloseCb(), s_FtpCallback(), CConn_IOStream::SetCanceledCallback(), CConn_Streambuf::x_Close(), CDownloadJob::x_Download(), CDownloadJob::x_DownloadAndExtract(), and CConn_Streambuf::x_Init().
◆ CONN_SetFlags() ◆ CONN_SetTimeout()Specify timeout for the connection I/O, including "Connect" (aka "Open") and "Close".
May be called at any time during the connection lifetime.
Definition at line 558 of file ncbi_connection.c.
References assert, conn, CONN_LOG_EX, CONN_NOT_NULL, eIO_Close, eIO_InvalidArg, eIO_Open, eIO_Read, eIO_ReadWrite, eIO_Success, eIO_Write, eLOG_Error, and kDefaultTimeout.
Referenced by CConnTest::CheckFWConnections(), CConn_FtpStream::Drain(), CConn_Streambuf::Fetch(), s_Open(), CConn_IOStream::SetTimeout(), CConn_Streambuf::showmanyc(), CId1Reader::x_ConnectAtSlot(), CId2Reader::x_ConnectAtSlot(), and CConn_Streambuf::x_Init().
◆ CONN_SetUserData() ◆ CONN_Status()Obtain status of the last I/O operation.
This is NOT a completion code of the last CONN call, but rather some status from a lower level CONNECTOR's layer (if available).
Definition at line 1154 of file ncbi_connection.c.
References assert, conn, CONN_NOT_NULL, eCONN_Canceled, eCONN_Corrupt, eCONN_Open, eCONN_Unusable, eIO_Interrupt, eIO_InvalidArg, eIO_NotSupported, eIO_Open, eIO_Read, eIO_ReadWrite, eIO_Success, eIO_Unknown, and eIO_Write.
Referenced by CConn_Streambuf::Status(), CConn_Streambuf::x_Close(), and CConn_Streambuf::x_Init().
◆ CONN_Wait()Block on the connection until it becomes available for either reading or writing (depending on "event"), until timeout expires, or until any error.
Definition at line 653 of file ncbi_connection.c.
References assert, BUF_Size(), conn, CONN_LOG, CONN_NOT_NULL, eCONN_Open, eIO_Interrupt, eIO_InvalidArg, eIO_NotSupported, eIO_Read, eIO_Success, eIO_Timeout, eIO_Write, eLOG_Critical, eLOG_Error, eLOG_Trace, eLOG_Warning, kDefaultTimeout, s_Open(), STimeoutTag::sec, and STimeoutTag::usec.
Referenced by CConnTest::CheckFWConnections(), CReaderServiceConnector::Connect(), CConnTest::ExtraCheckOnFailure(), CConn_Streambuf::Fetch(), CConn_IOStream::Wait(), and CId2FetchApp::x_InitConnection().
◆ CONN_Write()Definition at line 806 of file ncbi_connection.c.
References assert, conn, CONN_NOT_NULL, data, eCONN_Open, eIO_InvalidArg, eIO_NotSupported, eIO_Success, eIO_WritePersist, eIO_WritePlain, fCONN_Supplement, s_CONN_Write(), s_CONN_WritePersist(), s_Open(), ncbi::grid::netcache::search::fields::size, and Write().
Referenced by CConn_FtpStream::Drain(), CConn_Streambuf::overflow(), s_AsnWrite(), and CConn_Streambuf::xsputn().
◆ FILE_CreateConnector() ◆ FILE_CreateConnectorEx()Definition at line 353 of file ncbi_file_connector.c.
References SFileConnector::attr, SConnectorTag::destroy, eFCM_Truncate, SFileConnector::finp, SFileConnector::fout, free(), SConnectorTag::handle, SFileConnector::ifname, malloc(), SConnectorTag::meta, SConnectorTag::next, SFileConnector::ofname, s_Destroy(), s_Setup(), SConnectorTag::setup, and str().
Referenced by FILE_CreateConnector().
◆ FTP_CreateConnector() ◆ FTP_CreateConnectorSimple() ◆ HTTP_CreateConnector() ◆ HTTP_CreateConnectorEx()Create new CONNECTOR structure to hit the specified URL using HTTP with either POST / GET (or ANY) method.
Use the configuration values stored in "net_info". If "net_info" is NULL, then use the default info as created by ConnNetInfo_Create(0).
If "net_info" does not explicitly specify an HTTP request method (i.e. it has it as "eReqMethod_Any"), then the actual method sent to the HTTP server depends on whether any data has been written to the connection with CONN_Write(): the presence of pending data will cause a POST request (with a "Content-Length:" tag supplied automatically and reflecting the total pending data size), and GET request method will result in the absence of any data. An explicit value for the request method will cause the specified request to be used regardless of pending data, and will flag an error if any data will have to be sent with a GET (per the standard).
When not using HTTP/1.1's fHTTP_WriteThru mode, in order to work around some HTTP communication features, this code does:
1. Accumulate all output data in an internal memory buffer until the first CONN_Read() (including peek) or CONN_Wait(on read) is attempted (also see fHTTP_Flushable flag below). 2. On the first CONN_Read() or CONN_Wait(on read), compose and send the whole HTTP request as:
* METHOD <net_info->path>?<net_info->args> HTTP/1.0\r\n * <user_header\r\n> * Content-Length: <accumulated_data_length>\r\n * \r\n * <accumulated_data> *
When fHTTP_WriteThru is set with HTTP/1.1, writing to the connector begins upon any write operations, and reading from the connector causes the request body to finalize and response to be fetched from the server. Request method must be explicitly specified with fHTTP_WriteThru, "ANY" does not get accepted (eIO_NotSupported returned).
Definition at line 3003 of file ncbi_http_connector.c.
References cleanup(), flags, and s_CreateConnector().
Referenced by s_HttpConnectorBuilder(), s_Open(), and s_Resolve().
◆ HTTP_CreateTunnel() ◆ HTTP_CreateTunnelEx()Create a tunnel to "net_info->host:net_info->port" via an HTTP proxy server located at "net_info->http_proxy_host:net_info->http_proxy_port".
Return the tunnel as a socket via the last parameter. For compatibility with future API extensions, please make sure *sock is NULL when making the call. "net_info->scheme" is only used to infer the proper default form of the ":port" part in the "Host:" tag for the proxy request in case of HTTP[S] (thus, eURL_Unspec forces the ":port" part to be always present in the tag).
Definition at line 3016 of file ncbi_http_connector.c.
References assert, BUF_Prepend(), BUF_Size(), SHttpConnector::conn_state, eCS_Eom, eCS_ReadBody, eEM_Wait, eIO_InvalidArg, eIO_NotSupported, eIO_Success, eIO_Unknown, fHTTP_DropUnread, flags, SHttpConnector::http_code, SHttpConnector::net_info, s_CreateHttpConnector(), s_DestroyHttpConnector(), s_DropConnection(), s_PreRead(), SHttpConnector::sock, SConnNetInfo::timeout, and SHttpConnector::w_buf.
Referenced by HTTP_CreateTunnel(), and s_Connect().
◆ HTTP_SetNcbiMessageHook()Set a message hook procedure for messages originating from NCBI via HTTP.
Any hook will be called no more than once. Until no hook is installed, and exactly one message is caught, a critical error will be generated in the standard log file upon acceptance of every message. *Not MT-safe*.
Definition at line 3088 of file ncbi_http_connector.c.
References s_MessageHook, and s_MessageIssued.
◆ MEMORY_CreateConnector() ◆ MEMORY_CreateConnectorEx()Definition at line 249 of file ncbi_memory_connector.c.
References buf, SMemoryConnector::buf, SConnectorTag::destroy, free(), SConnectorTag::handle, malloc(), SConnectorTag::meta, SConnectorTag::next, SMemoryConnector::own_buf, s_Destroy(), s_Setup(), and SConnectorTag::setup.
Referenced by MEMORY_CreateConnector(), and s_CreateConnectorMemory().
◆ METACONN_Insert()Insert a connector at the beginning of the connection's list of connectors.
Calls connector's FSetupVTable, which must be defined.
Definition at line 85 of file ncbi_connector.c.
References assert, SMetaConnector::default_timeout, eIO_InvalidArg, eIO_Success, eIO_Unknown, eLOG_Critical, eLOG_Error, g_NcbiDefConnTimeout, kDefaultTimeout, SMetaConnector::list, SConnectorTag::meta, METACONN_LOG, SConnectorTag::next, and SConnectorTag::setup.
Referenced by s_VT_Open(), and x_ReInit().
◆ METACONN_Remove() ◆ NAMEDPIPE_CreateConnector() ◆ PIPE_CreateConnector()Create CPipe-based CONNECTOR.
Create new CONNECTOR structure to handle data transfer with a spawned process (command) over an interprocess pipe. Return NULL on error.
Definition at line 235 of file ncbi_pipe_connector.cpp.
References cmd, eTakeOwnership, flags, make_c_unique(), malloc(), s_Destroy(), and s_Setup().
Referenced by s_PipeConnectorBuilder().
◆ SERVICE_CreateConnectorEx()Definition at line 1287 of file ncbi_service_connector.c.
References assert, calloc(), ConnNetInfo_Clone(), ConnNetInfo_CreateInternal(), ConnNetInfo_Destroy(), SConnectorTag::destroy, eFWMode_Adaptive, SServiceConnectorTag::extra, fHTTP_NoAutoRetry, SConnNetInfo::firewall, SSERVICE_Extra::flags, free(), fSERV_DelayOpen, fSERV_Firewall, fSERV_Stateless, SConnectorTag::handle, SServiceConnectorTag::iter, len, malloc(), SConnNetInfo::max_try, SConnectorTag::meta, SServiceConnectorTag::name, SServiceConnectorTag::net_info, SConnectorTag::next, s_Destroy(), s_OpenDispatcher(), s_Setup(), SERV_ServiceName(), SConnectorTag::setup, SConnNetInfo::stateless, SServiceConnectorTag::types, and types.
Referenced by CreateAsnConn_ServiceEx(), and s_ServiceConnectorBuilder().
◆ SOCK_CreateConnector() CONNECTOR SOCK_CreateConnector ( const char * host, unsigned short port, unsigned short max_try ) ◆ SOCK_CreateConnectorEx() CONNECTOR SOCK_CreateConnectorEx ( const char * host, unsigned short port, unsigned short max_try, const void * data, size_t size, TSOCK_Flags flags ) ◆ SOCK_CreateConnectorOnTop() CONNECTOR SOCK_CreateConnectorOnTop ( SOCK sock, unsigned short own_sock ) ◆ SOCK_CreateConnectorOnTopEx() CONNECTOR SOCK_CreateConnectorOnTopEx ( SOCK sock, unsigned short own_sock, const char * hostport ) ◆ adjust ◆ c_close ◆ c_descr ◆ c_flush ◆ c_get_type ◆ c_open ◆ c_read ◆ c_status ◆ c_wait ◆ c_write ◆ cleanup ◆ close ◆ data [1/3] void* SCONN_Callback::data ◆ data [2/3] void* SFTP_Callback::data ◆ data [3/3] void* SSERVICE_Extra::dataDefinition at line 60 of file ncbi_service_connector.h.
Referenced by CReaderServiceConnector::Connect(), s_Adjust(), s_Close(), s_Destroy(), s_GetNextInfo(), s_Open(), s_ParseHeader(), s_ServiceConnectorBuilder(), CConn_ServiceStream::sx_Adjust(), CConn_ServiceStream::sx_Cleanup(), CConn_ServiceStream::sx_GetNextInfo(), CConn_ServiceStream::sx_ParseHeader(), CConn_ServiceStream::sx_Reset(), CRPCClient< TRequest, TReply >::x_FillConnNetInfo(), and CHttpRequest::x_InitConnection().
◆ default_timeout ◆ default_tmo ◆ descr ◆ destroydestroys handle, can be NULL
Definition at line 268 of file ncbi_connector.h.
Referenced by FILE_CreateConnectorEx(), MEMORY_CreateConnectorEx(), METACONN_Remove(), s_CreateConnector(), s_Init(), s_Resolve(), SERVICE_CreateConnectorEx(), x_DestroyConnector(), x_LoadLocalIPs(), and CConn_Streambuf::~CConn_Streambuf().
◆ flags ◆ flush ◆ func [1/2] ◆ func [2/2] ◆ g_NcbiDefConnTimeout ◆ get_next_info ◆ get_type ◆ handle void* SConnectorTag::handledata handle of the connector
Definition at line 269 of file ncbi_connector.h.
Referenced by CONN_GetSOCK(), FILE_CreateConnectorEx(), CConn_MemoryStream::GetBUF(), MEMORY_CreateConnectorEx(), s_Close(), s_CreateConnector(), s_Destroy(), s_Init(), s_Setup(), s_VT_Close(), s_VT_Descr(), s_VT_Flush(), s_VT_GetType(), s_VT_Open(), s_VT_Read(), s_VT_Status(), s_VT_Wait(), s_VT_Write(), and SERVICE_CreateConnectorEx().
◆ list ◆ metaback link to original meta
Definition at line 266 of file ncbi_connector.h.
Referenced by CConn_Streambuf::CConn_Streambuf(), CONN_GetSOCK(), FILE_CreateConnectorEx(), MEMORY_CreateConnectorEx(), METACONN_Insert(), METACONN_Remove(), s_Close(), s_CreateConnector(), s_Init(), s_Setup(), s_VT_Open(), SERVICE_CreateConnectorEx(), and x_DestroyConnector().
◆ nextlinked list
Definition at line 270 of file ncbi_connector.h.
Referenced by CConn_Streambuf::CConn_Streambuf(), FILE_CreateConnectorEx(), MEMORY_CreateConnectorEx(), METACONN_Insert(), METACONN_Remove(), s_CreateConnector(), s_Init(), s_VT_Open(), SERVICE_CreateConnectorEx(), x_DestroyConnector(), and x_ReInit().
◆ open ◆ parse_header ◆ r_pos ◆ read ◆ reset ◆ setup ◆ status ◆ w_mode ◆ w_pos ◆ wait ◆ writeRetroSearch 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