diff --git a/README.md b/README.md index a761138..6aba6d0 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,21 @@ -![](https://code.dlang.org/packages/tristanable/logo?s=5ef1c9f1250f57dd4c37efbf) +![](branding/logo_small.png) tristanable =========== -**Tristanable** is a library for D-based libraries and applications that need a way to receive variable-length messages of different types (via a `Socket`) and place these messages into their own resepctively tagged queues indicated by their _"type"_ or `id`. +**Tristanable** is a library for D-based libraries and applications that need a way to receive variable-length messages of different types (via a `Socket`) and place these messages into their own respectively tagged queues indicated by their _"type"_ or `id`. ## What problems does it solve? ### Human example -Say now you made a request to a server with a tag `1` and expect a reply with that same tag `1`. Now, for a moment, think about what would happen in a tagless system. You would be expecting a reply, say now the weather report for your area, but what if the server has another thread that writes an instant messenger notification to the server's socket before the weather message is sent? Now you will inetrpret those bytes as if they were a weather message. +Say now you made a request to a server with a tag `1` and expect a reply with that same tag `1`. Now, for a moment, think about what would happen in a tagless system. You would be expecting a reply, say now the weather report for your area, but what if the server has another thread that writes an instant messenger notification to the server's socket before the weather message is sent? Now you will interpret those bytes as if they were a weather message. -Tristanable provides a way for you to receive the "IM notification first" but block and dequeue (when it arrives in the queue) for the "weather report". Irresepctoive of wether (no pun intended) the weather report arrives before the "IM notification" or after. +Tristanable provides a way for you to receive the "IM notification first" but block and dequeue (when it arrives in the queue) for the "weather report". Irrespective of wether (no pun intended) the weather report arrives before the "IM notification" or after. ### Code example -If we wanted to implement the following we would do the following. One note is that instead of waiting on messages of a specific _"type"_ (or rather **tag**), tristanable provides not just a one-message lengthb uffer per tag but infact a full queue per tag, meaning any received message with tag `1` will be enqueued and not dropped after the first message of type `1` is buffered. +If we wanted to implement the following we would do the following. One note is that instead of waiting on messages of a specific _"type"_ (or rather **tag**), tristanable provides not just a one-message length buffer per tag but in fact a full queue per tag, meaning any received message with tag `1` will be enqueued and not dropped after the first message of type `1` is buffered. ```d import tristanable.manager; @@ -39,7 +39,7 @@ manager.addQueue(instantNotification); QueueItem message = weatherQueue.dequeue(); ``` -Surely, there must be some sort of encoding mechanism too? The messages afterall need to be encoded. **No problem!**, we have that sorted: +Surely, there must be some sort of encoding mechanism too? The messages after all need to be encoded. **No problem!**, we have that sorted: ```d import tristanable.encoding; diff --git a/branding/logo_base.xcf b/branding/logo_base.xcf new file mode 100644 index 0000000..c6e7a0e Binary files /dev/null and b/branding/logo_base.xcf differ diff --git a/branding/logo_small.png b/branding/logo_small.png new file mode 100644 index 0000000..3bbb90d Binary files /dev/null and b/branding/logo_small.png differ diff --git a/branding/logo_small.xcf b/branding/logo_small.xcf new file mode 100644 index 0000000..7e1b1b8 Binary files /dev/null and b/branding/logo_small.xcf differ