docs/Writerside/topics/buffer.h.md

Thu, 23 Jan 2025 01:33:36 +0100

author
Mike Becker <universe@uap-core.de>
date
Thu, 23 Jan 2025 01:33:36 +0100
branch
docs/3.1
changeset 1141
a06a2d27c043
child 1142
9437530176bc
permissions
-rw-r--r--

create new page structure

relates to #451

1141
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 # buffer.h
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
3 Instances of this buffer implementation can be used to read from or write to memory like you would do with a stream.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
4 This allows the use of `cx_stream_copy()` (see [Utilities](#utilities)) to copy contents from one buffer to another,
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
5 or from a file or network streams to the buffer and vice-versa.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
6
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
7 More features for convenient use of the buffer can be enabled, like automatic memory management and automatic
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
8 resizing of the buffer space.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
9
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
10 Since UCX 3.0, the buffer also supports automatic flushing of contents to another stream (or buffer) as an alternative
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
11 to automatically resizing the buffer space.
a06a2d27c043 create new page structure
Mike Becker <universe@uap-core.de>
parents:
diff changeset
12 Please refer to the API doc for the fields prefixed with `flush_` to learn more.

mercurial