A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/ncbi__dispd_8c_source.html below:

NCBI C++ ToolKit: src/connect/ncbi_dispd.c Source File

43 #define NCBI_USE_ERRCODE_X Connect_LBSM 49 #define fabs(v) ((v) < 0.0 ? -(v) : (v)) 52 #define DISPD_STALE_RATIO_OK 0.8 54 #define DISPD_LOCAL_BONUS 1.2 92  for

(

n

= 0;

n

<

data

->n_cand; ++

n

) {

103  if

(

data

->n_cand ==

data

->a_cand) {

105  n

=

data

->a_cand + 10;

107

? realloc(

data

->cand,

n

*

sizeof

(*temp))

108

:

malloc

(

n

*

sizeof

(*temp)));

134  if

(server_error == 400 || server_error == 403 || server_error == 404)

136  data

->code = server_error;

137

}

else if

(sscanf(header,

"%*s %d"

, &

data

->code) < 1) {

161  return data

->fail ? 0

: 1

;

184

?

"Dispatch-Mode: PROMISCUOUS\r\n" 186

?

"Dispatch-Mode: OK_DOWN\r\n" 188

?

"Dispatch-Mode: OK_SUPPRESSED\r\n" 189

:

"Dispatch-Mode: INFORMATION_ONLY\r\n"

)

192

?

"Client-Mode: REVERSE_DNS\r\n" 194

?

"Client-Mode: STATEFUL_CAPABLE\r\n" 195

:

"Client-Mode: STATELESS_ONLY\r\n"

)) {

211

(

"[%s] Unable to create %s network dispatcher%s%s%s: %s"

,

212

iter->

name

, c ?

"connection to"

:

"connector for"

,

213

url ?

" at \""

:

""

, url ? url :

""

, &

"\""

[!url],

216  free

((

void

*) url);

219  else if

(c && c->destroy)

227  static const char

server_info[] =

"Server-Info-"

;

232

&&

isdigit

((

unsigned char

)

text

[

sizeof

(server_info) - 1])) {

239  text

+=

sizeof

(server_info) - 1;

240  if

(sscanf(

text

,

"%u: %n"

, &d1, &d2) < 1 || d1 < 1)

247  while

(*name &&

isspace

((

unsigned char

)(*name)))

253  for

(c = s + (name - s); *c; ++c) {

254  if

(

isspace

((

unsigned char

)(*c)))

258

d2 += (

int

)(c - s);

279 #if defined(_DEBUG) && !defined(NDEBUG) 280  if

(

data

->net_info->debug_printout) {

285

(

"[%s] %s"

, iter->

name

,

text

));

302  double

status = 0.0, total = 0.0;

304  if

(

data

->n_cand) {

306  while

(i < data->

n_cand

) {

309  if

(

info

->time < now) {

310  if

(i < --data->

n_cand

) {

312  sizeof

(*

data

->cand)*(

data

->n_cand -

i

));

328  return n

<

data

->n_cand ? &

data

->cand[

n

] : 0;

356

(

data

->n_cand -

n

) *

sizeof

(*

data

->cand));

374  for

(

i

= 0;

i

<

data

->n_cand; ++

i

)

417  data

->net_info->stateless = 1

;

422  "User-Agent: NCBIServiceDispatcher/" 441  if

(!

data

->n_cand && (

data

->fail

442

|| !(

data

->net_info->stateless &&

443  data

->net_info->firewall))) {

445

(

"SERV_DISPD_Open(\"%s\"): Service not found"

, iter->

name

));

static CS_CONNECTION * conn

CONNECTOR HTTP_CreateConnectorEx(const SConnNetInfo *net_info, THTTP_Flags flags, FHTTP_ParseHeader parse_header, void *user_data, FHTTP_Adjust adjust, FHTTP_Cleanup cleanup)

Create new CONNECTOR structure to hit the specified URL using HTTP with either POST / GET (or ANY) me...

EIO_Status CONN_Flush(CONN conn)

Explicitly flush connection from any pending data written by CONN_Write().

EIO_Status CONN_Create(CONNECTOR connector, CONN *conn)

Same as CONN_CreateEx() called with 0 in the "flags" parameter.

EHTTP_HeaderParse

The extended version HTTP_CreateConnectorEx() is able to track the HTTP response chain and also chang...

EIO_Status CONN_Close(CONN conn)

Close the connection and destroy all relevant internal data.

@ fHTTP_Flushable

Connector will really flush on Flush()

@ eHTTP_HeaderSuccess

Parse succeeded, retain server status.

@ eHTTP_HeaderError

Parse failed, treat as a server error.

struct SSERV_IterTag * SERV_ITER

Iterator through the servers.

int SERV_EqualInfo(const SSERV_Info *info1, const SSERV_Info *info2)

@ fSERV_Stateless

Stateless servers only.

int ConnNetInfo_ExtendUserHeader(SConnNetInfo *net_info, const char *header)

int ConnNetInfo_SetupStandardArgs(SConnNetInfo *net_info, const char *service)

int ConnNetInfo_OverrideUserHeader(SConnNetInfo *net_info, const char *header)

SConnNetInfo * ConnNetInfo_Clone(const SConnNetInfo *net_info)

#define NCBI_TIME_INFINITE

char * ConnNetInfo_URL(const SConnNetInfo *net_info)

const char * IO_StatusStr(EIO_Status status)

Get the text form of an enum status value.

void ConnNetInfo_DeleteUserHeader(SConnNetInfo *net_info, const char *header)

void ConnNetInfo_Destroy(SConnNetInfo *net_info)

@ eIO_Success

everything is fine, no error occurred

@ eIO_Unknown

unknown I/O error (likely fatal but can retry)

@ eFWMode_Adaptive

Regular firewall ports first, then fallback.

unsigned int

A callback function used to compare two keys in a database.

if(yy_accept[yy_current_state])

static const CS_INT unused

static void text(MDB_val *v)

#define NCBI_DISP_VERSION

#define HTTP_DISP_FAILURES

#define HTTP_DISP_MESSAGES

#define DISPD_LOCAL_BONUS

static int s_IsUpdateNeeded(struct SDISPD_Data *data, TNCBI_Time now)

static SLB_Candidate * s_GetCandidate(void *user_data, size_t n)

static void s_Close(SERV_ITER)

static void s_Reset(SERV_ITER)

#define DISPD_STALE_RATIO_OK

static int s_Adjust(SConnNetInfo *net_info, void *iter, unsigned int unused)

static SSERV_Info * s_GetNextInfo(SERV_ITER, HOST_INFO *)

static int s_Update(SERV_ITER, const char *, int)

const SSERV_VTable * SERV_DISPD_Open(SERV_ITER iter, const SConnNetInfo *net_info, SSERV_Info **info)

static EHTTP_HeaderParse s_ParseHeader(const char *header, void *user_data, int server_error)

static int s_AddServerInfo(struct SDISPD_Data *data, SSERV_Info *info)

static void s_Resolve(SERV_ITER iter)

static const SSERV_VTable kDispdOp

size_t LB_Select(SERV_ITER iter, void *data, FGetCandidate get_candidate, double bonus)

unsigned int g_NCBI_ConnectRandomSeed

#define CORE_LOGF_X(subcode, level, fmt_args)

#define NCBI_CONNECT_SRAND_ADDEND

#define CORE_LOGF(level, fmt_args)

SSERV_Info * SERV_ReadInfoEx(const char *str, const char *name, int lazy)

const char * SERV_NameOfInfo(const SSERV_Info *info)

int SERV_Update(SERV_ITER iter, const char *text, int code)

char * SERV_Print(SERV_ITER iter, const SConnNetInfo *net_info, int but_last)

voidp calloc(uInt items, uInt size)


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