source: EcnlProtoTool/trunk/curl-7.57.0/lib/conncache.h@ 331

Last change on this file since 331 was 331, checked in by coas-nagasima, 6 years ago

prototoolに関連するプロジェクトをnewlibからmuslを使うよう変更・更新
ntshellをnewlibの下位の実装から、muslのsyscallの実装に変更・更新
以下のOSSをアップデート
・mruby-1.3.0
・musl-1.1.18
・onigmo-6.1.3
・tcc-0.9.27
以下のOSSを追加
・openssl-1.1.0e
・curl-7.57.0
・zlib-1.2.11
以下のmrbgemsを追加
・iij/mruby-digest
・iij/mruby-env
・iij/mruby-errno
・iij/mruby-iijson
・iij/mruby-ipaddr
・iij/mruby-mock
・iij/mruby-require
・iij/mruby-tls-openssl

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/x-chdr
File size: 2.9 KB
Line 
1#ifndef HEADER_CURL_CONNCACHE_H
2#define HEADER_CURL_CONNCACHE_H
3/***************************************************************************
4 * _ _ ____ _
5 * Project ___| | | | _ \| |
6 * / __| | | | |_) | |
7 * | (__| |_| | _ <| |___
8 * \___|\___/|_| \_\_____|
9 *
10 * Copyright (C) 2015 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al.
11 * Copyright (C) 2012 - 2014, Linus Nielsen Feltzing, <linus@haxx.se>
12 *
13 * This software is licensed as described in the file COPYING, which
14 * you should have received as part of this distribution. The terms
15 * are also available at https://curl.haxx.se/docs/copyright.html.
16 *
17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
18 * copies of the Software, and permit persons to whom the Software is
19 * furnished to do so, under the terms of the COPYING file.
20 *
21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
22 * KIND, either express or implied.
23 *
24 ***************************************************************************/
25
26struct conncache {
27 struct curl_hash hash;
28 size_t num_connections;
29 long next_connection_id;
30 struct curltime last_cleanup;
31 /* handle used for closing cached connections */
32 struct Curl_easy *closure_handle;
33};
34
35#define BUNDLE_NO_MULTIUSE -1
36#define BUNDLE_UNKNOWN 0 /* initial value */
37#define BUNDLE_PIPELINING 1
38#define BUNDLE_MULTIPLEX 2
39
40struct connectbundle {
41 int multiuse; /* supports multi-use */
42 size_t num_connections; /* Number of connections in the bundle */
43 struct curl_llist conn_list; /* The connectdata members of the bundle */
44};
45
46/* returns 1 on error, 0 is fine */
47int Curl_conncache_init(struct conncache *, int size);
48void Curl_conncache_destroy(struct conncache *connc);
49
50/* return the correct bundle, to a host or a proxy */
51struct connectbundle *Curl_conncache_find_bundle(struct connectdata *conn,
52 struct conncache *connc);
53
54CURLcode Curl_conncache_add_conn(struct conncache *connc,
55 struct connectdata *conn);
56
57void Curl_conncache_remove_conn(struct conncache *connc,
58 struct connectdata *conn);
59
60void Curl_conncache_foreach(struct Curl_easy *data,
61 struct conncache *connc,
62 void *param,
63 int (*func)(struct connectdata *conn,
64 void *param));
65
66struct connectdata *
67Curl_conncache_find_first_connection(struct conncache *connc);
68
69struct connectdata *
70Curl_conncache_oldest_idle(struct Curl_easy *data);
71void Curl_conncache_close_all_connections(struct conncache *connc);
72void Curl_conncache_print(struct conncache *connc);
73
74#endif /* HEADER_CURL_CONNCACHE_H */
Note: See TracBrowser for help on using the repository browser.