Commit cdf66ab
committed
feat: enable persistent
This commit introduces a new function, curl_share_init_persistent, that
creates a php_curlsh struct that can live beyond a single PHP request.
Persisting a curl share handle would allow PHP userspace to cache things
like DNS lookups, or even entire connections, between multiple PHP
requests, thus reducing work for subsequent requests.
I created a new function instead of reusing the existing curl_share_init
function since it also takes an array of curl_share_setopt options to
set when the persistent handle doesn't yet exist.
It is noteworthy that calling curl_share_setopt on the persistent handle
would affect future requests using the handle; we could consider
preventing this.
It is also noteworthy that changing the persistent share options would
not take effect if the persistent share already existed; changing the
persistent share ID would be sufficient to resolve that.CurlShareHandle objects1 parent 6bf703a commit cdf66ab
File tree
5 files changed
+99
-9
lines changed- ext/curl
5 files changed
+99
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3745 | 3745 | | |
3746 | 3746 | | |
3747 | 3747 | | |
| 3748 | + | |
| 3749 | + | |
| 3750 | + | |
3748 | 3751 | | |
3749 | 3752 | | |
3750 | 3753 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
125 | 125 | | |
126 | 126 | | |
127 | 127 | | |
128 | | - | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
129 | 131 | | |
130 | 132 | | |
131 | 133 | | |
| 134 | + | |
132 | 135 | | |
133 | 136 | | |
134 | 137 | | |
| |||
152 | 155 | | |
153 | 156 | | |
154 | 157 | | |
155 | | - | |
| 158 | + | |
| 159 | + | |
156 | 160 | | |
157 | 161 | | |
158 | 162 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
409 | 409 | | |
410 | 410 | | |
411 | 411 | | |
412 | | - | |
| 412 | + | |
413 | 413 | | |
414 | 414 | | |
415 | 415 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
31 | 94 | | |
32 | 95 | | |
33 | 96 | | |
| |||
42 | 105 | | |
43 | 106 | | |
44 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
45 | 116 | | |
46 | 117 | | |
47 | 118 | | |
| |||
79 | 150 | | |
80 | 151 | | |
81 | 152 | | |
82 | | - | |
| 153 | + | |
83 | 154 | | |
84 | 155 | | |
85 | 156 | | |
| |||
101 | 172 | | |
102 | 173 | | |
103 | 174 | | |
104 | | - | |
105 | | - | |
| 175 | + | |
| 176 | + | |
106 | 177 | | |
107 | 178 | | |
108 | 179 | | |
| |||
154 | 225 | | |
155 | 226 | | |
156 | 227 | | |
157 | | - | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
158 | 232 | | |
159 | 233 | | |
160 | 234 | | |
161 | 235 | | |
162 | 236 | | |
163 | | - | |
| 237 | + | |
164 | 238 | | |
165 | 239 | | |
166 | 240 | | |
| |||
170 | 244 | | |
171 | 245 | | |
172 | 246 | | |
| 247 | + | |
| 248 | + | |
173 | 249 | | |
0 commit comments