diff --git a/include/ircd/buffer/README.md b/include/ircd/buffer/README.md new file mode 100644 index 000000000..d6877a438 --- /dev/null +++ b/include/ircd/buffer/README.md @@ -0,0 +1,26 @@ +## Memory Buffer Tools + +This is a modernization of the `(char *buf, size_t buf_sz)` pattern used +when working with segments of RAMs. While in C99 it is possible (and +recommended) for a project to create a `struct buffer { char *ptr; size_t size; };` +and then manually perform object semantics `buffer_copy(dst, src);` +`buffer_move(dst, src)``buffer_free(buf);` etc, we create those devices using +C++ language features here instead. + +This suite is born out of (though not directly based on) the boost::asio buffer +objects `boost::asio::const_buffer` and `boost::asio::mutable_buffer` and the +two principal objects used ubiquitously throughout IRCd share the same names +and general properties. We also offer conversions between them for developers +working with any asio interfaces directly. + +To summarize some basics about these tools: + +- Most of these interfaces are "thin" and don't own their underlying data, nor +will they copy their underlying data even if their instance itself is copied. + +- We work with signed `char *` (and `const char *`) types. We do not work with +`void` pointers because size integers always represent a count of single bytes +and there is no reason to lose or confuse that information. If `unsigned char *` +types are required by some library function an explicit cast to `uint8_t *` may +be required especially to avoid warnings. Note that we compile this project with +`-fsigned-char` and don't support platforms that have incompatible conversions. diff --git a/include/ircd/ctx/README.md b/include/ircd/ctx/README.md index a16c4773a..3bd692e5c 100644 --- a/include/ircd/ctx/README.md +++ b/include/ircd/ctx/README.md @@ -1,4 +1,4 @@ -# Userspace Context Switching +## Userspace Context Switching The `ircd::ctx` subsystem is a userspace threading library meant to regress the asynchronous callback pattern back to synchronous suspensions. These are diff --git a/include/ircd/db/README.md b/include/ircd/db/README.md index c691cdda2..ec9ca46fc 100644 --- a/include/ircd/db/README.md +++ b/include/ircd/db/README.md @@ -1,4 +1,4 @@ -## IRCd Database +## Database The database here is a strictly schematized key-value grid built from the primitives of `column`, `cell` and `row`. We use the database as both a flat-object store (matrix diff --git a/include/ircd/fs/README.md b/include/ircd/fs/README.md new file mode 100644 index 000000000..bb113e112 --- /dev/null +++ b/include/ircd/fs/README.md @@ -0,0 +1 @@ +## Local Filesystem Interface diff --git a/include/ircd/mods/README.md b/include/ircd/mods/README.md new file mode 100644 index 000000000..c04da98eb --- /dev/null +++ b/include/ircd/mods/README.md @@ -0,0 +1,5 @@ +## Loadable Modules + +In the spirit of IRCd we present this fundamental interface to load and update +the functionality of the server at runtime without restarting and interrupting +service to users. diff --git a/include/ircd/net/README.md b/include/ircd/net/README.md index 047b4f913..74dffeafa 100644 --- a/include/ircd/net/README.md +++ b/include/ircd/net/README.md @@ -1,4 +1,4 @@ -## IRCd Networking +## Network Interface #### open() diff --git a/include/ircd/server/README.md b/include/ircd/server/README.md new file mode 100644 index 000000000..5335959ec --- /dev/null +++ b/include/ircd/server/README.md @@ -0,0 +1,7 @@ +## Interface To Remote Servers + +This system manages connections and requests to remote servers when this +server plays the role of client. This interface allows its user to make +concurrent requests using the promise/future pattern. It is built on top of +`ircd::ctx::future`, as well as many functions of `ircd::net` and also +uses `ircd::http`. diff --git a/include/ircd/util/README.md b/include/ircd/util/README.md index 82ef9517e..80472ebd7 100644 --- a/include/ircd/util/README.md +++ b/include/ircd/util/README.md @@ -1,4 +1,4 @@ -# Utility toolchest +## Utility Toolchest This namespace contains an accumulated collection of miscellaneous classes and functions which have demonstrated value some place in the project, but are