Commit 58afc5b
committed
feat(sh2lib): distinct recv and send funcs
sh2lib_execute() processes send, then recv. This is fine
for a general purpose connection, but can lead to code like:
loop:
1) sh2lib_execute()
2) based on handler called in (1), sh2lib_do_get/post()
3) do other system task
^^This means that any requests queued in (2) cannot be sent
until the next sh2lib_execute(). Instead, this commit
splits sh2lib_execute() into distinct _send() and _recv()
phases, so client use this pattern, which reduces latency
between request generation in (2) and request sending in(3):
loop:
1) sh2lib_execute_recv()
2) based on handler called in (1), sh2lib_do_get/post()
3) sh2lib_execute_send()
4) do other system task1 parent 2e74536 commit 58afc5b
2 files changed
+54
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
331 | | - | |
| 331 | + | |
332 | 332 | | |
333 | | - | |
334 | 333 | | |
335 | 334 | | |
336 | 335 | | |
337 | | - | |
| 336 | + | |
338 | 337 | | |
339 | | - | |
340 | 338 | | |
341 | 339 | | |
342 | 340 | | |
343 | 341 | | |
344 | 342 | | |
345 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
346 | 364 | | |
347 | 365 | | |
348 | 366 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
204 | 236 | | |
205 | 237 | | |
206 | 238 | | |
| |||
0 commit comments