mirror of
https://github.com/cesanta/mongoose.git
synced 2026-10-23 11:44:53 +00:00
struct iobuf doc
This commit is contained in:
1 parent
40b99e3751
commit
5bf5516b29
3 files changed
+9
-4
No files matched your search
+7
-2
@@ -1354,12 +1354,17 @@ Usage example:
|
||||
|
||||
## IO Buffers
|
||||
|
||||
IO buffer, described by the `struct mg_iobuf`, is a simple data structure
|
||||
that insert or delete chunks of data at arbitrary offsets and grow/shrink
|
||||
automatically.
|
||||
|
||||
### struct mg\_iobuf
|
||||
|
||||
```c
|
||||
struct mg_iobuf {
|
||||
unsigned char *buf;
|
||||
size_t size, len;
|
||||
unsigned char *buf; // Pointer to stored data
|
||||
size_t size; // Total size available
|
||||
size_t len; // Current number of bytes
|
||||
};
|
||||
```
|
||||
|
||||
|
||||
+1
-1
@@ -628,7 +628,7 @@ const char *mg_url_uri(const char *url);
|
||||
#include <stddef.h>
|
||||
|
||||
struct mg_iobuf {
|
||||
unsigned char *buf; // Data
|
||||
unsigned char *buf; // Pointer to stored data
|
||||
size_t size; // Total size available
|
||||
size_t len; // Current number of bytes
|
||||
};
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@
|
||||
#include <stddef.h>
|
||||
|
||||
struct mg_iobuf {
|
||||
unsigned char *buf; // Data
|
||||
unsigned char *buf; // Pointer to stored data
|
||||
size_t size; // Total size available
|
||||
size_t len; // Current number of bytes
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user