mirror of
https://github.com/curl/curl.git
synced 2026-07-24 00:07:17 +03:00
tidy-up: miscellaneous
- tool_bname: scope an include. - `endif` comments. - Markdown fixes. - comment tidy-ups. - whitespace, newlines, indent. Closes #20309
This commit is contained in:
parent
62ba3604dc
commit
ac6264366f
98 changed files with 829 additions and 863 deletions
|
|
@ -34,9 +34,9 @@ Curl_easy *data connectdata *conn cf-ssl cf-socket
|
|||
|https://curl.se/|----> | properties |----> | keys |---> | socket |--> OS --> network
|
||||
+----------------+ +-----------------+ +-------+ +--------+
|
||||
|
||||
Curl_write(data, buffer)
|
||||
Curl_write(data, buffer)
|
||||
--> Curl_cfilter_write(data, data->conn, buffer)
|
||||
---> conn->filter->write(conn->filter, data, buffer)
|
||||
--> conn->filter->write(conn->filter, data, buffer)
|
||||
```
|
||||
|
||||
While connection filters all do different things, they look the same from the
|
||||
|
|
@ -77,10 +77,9 @@ etc.
|
|||
Each filter does in principle the following:
|
||||
|
||||
```
|
||||
static CURLcode
|
||||
myfilter_cf_connect(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
bool *done)
|
||||
static CURLcode myfilter_cf_connect(struct Curl_cfilter *cf,
|
||||
struct Curl_easy *data,
|
||||
bool *done)
|
||||
{
|
||||
CURLcode result;
|
||||
|
||||
|
|
@ -140,8 +139,8 @@ filter, once it is connected, just passes the calls through. Those filters
|
|||
implementations look like this:
|
||||
|
||||
```
|
||||
ssize_t Curl_cf_def_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
const void *buf, size_t len, CURLcode *err)
|
||||
ssize_t Curl_cf_def_send(struct Curl_cfilter *cf, struct Curl_easy *data,
|
||||
const void *buf, size_t len, CURLcode *err)
|
||||
{
|
||||
return cf->next->cft->do_send(cf->next, data, buf, len, err);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,7 +51,8 @@ Whenever a PUBLISH packet is received, curl outputs two bytes topic length
|
|||
## Caveats
|
||||
|
||||
Remaining limitations:
|
||||
- Only QoS level 0 is implemented for publish
|
||||
- No way to set retain flag for publish
|
||||
- No TLS (mqtts) support
|
||||
- Naive EAGAIN handling does not handle split messages
|
||||
|
||||
- Only QoS level 0 is implemented for publish
|
||||
- No way to set retain flag for publish
|
||||
- No TLS (mqtts) support
|
||||
- Naive EAGAIN handling does not handle split messages
|
||||
|
|
|
|||
|
|
@ -88,13 +88,13 @@ work has not been started.
|
|||
|
||||
Ideas:
|
||||
|
||||
- Read stdin and send off as messages. Consider newline as end of fragment.
|
||||
(default to text? offer option to set binary)
|
||||
- Respond to PINGs automatically
|
||||
- Issue PINGs at some default interval (option to switch off/change interval?)
|
||||
- Allow `-d` to specify (initial) data to send (should the format allow for
|
||||
multiple separate frames?)
|
||||
- Exit after N messages received, where N can be zero.
|
||||
- Read stdin and send off as messages. Consider newline as end of fragment.
|
||||
(default to text? offer option to set binary)
|
||||
- Respond to PINGs automatically
|
||||
- Issue PINGs at some default interval (option to switch off/change interval?)
|
||||
- Allow `-d` to specify (initial) data to send (should the format allow for
|
||||
multiple separate frames?)
|
||||
- Exit after N messages received, where N can be zero.
|
||||
|
||||
## Future work
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue