mirror of
https://github.com/tezc/sc.git
synced 2025-01-28 07:03:06 +08:00
doc: Minor fixes
This commit is contained in:
parent
504f9ac09e
commit
1bb8296eca
@ -30,9 +30,9 @@ Sanitizers : valgrind and clang/gcc sanitizers(address, undefined, thread)
|
||||
### List
|
||||
|
||||
| Library | Description |
|
||||
|--------------------------------|--------------------------------------------------------------------------------------------|
|
||||
|--------------------------------|---------------------------------------------------------------------------------------------|
|
||||
| **[array](array)** | Generic array/vector |
|
||||
| **[buffer](buffer)** | Buffer for encoding/decoding variables, best fit for protocol/serialization implementations|
|
||||
| **[buffer](buffer)** | Buffer for encoding/decoding variables, best fit for protocol/serialization implementations |
|
||||
| **[condition](condition)** | Condition wrapper for Posix and Windows |
|
||||
| **[crc32](crc32)** | Crc32c, uses crc32c CPU instruction if available |
|
||||
| **[heap](heap)** | Min heap which can be used as max heap/priority queue as well |
|
||||
|
@ -3,7 +3,7 @@
|
||||
### Overview
|
||||
|
||||
- Buffer implementation for serializing data/protocol implementation.
|
||||
- Works with binary data, 8/16/32/64 bit integers, double and strings.
|
||||
- Works with binary data, 8/16/32/64-bit integers, double and strings.
|
||||
- Strings are kept length prefixed and null ended. So, no need to copy string
|
||||
when you are reading, you just get the pointer. This is useful to avoid memory
|
||||
allocation overhead.
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
- Intrusive doubly linked list.
|
||||
- Basically, same as adding next and prev pointers to your structs.
|
||||
- Add/remove from head/tail is possible so it can be used as list, stack,
|
||||
- Add/remove from head/tail is possible, so it can be used as list, stack,
|
||||
queue, dequeue etc.
|
||||
|
||||
### Usage
|
||||
|
@ -3,7 +3,7 @@
|
||||
### Overview
|
||||
|
||||
- Open addressing hashmap with linear probing.
|
||||
- Requires postfix naming, e.g sc_map_str, sc_map_int. It's ugly but necessary
|
||||
- Requires postfix naming, e.g. sc_map_str, sc_map_int. It's ugly but necessary
|
||||
for better performance.
|
||||
|
||||
- Comes with predefined key value pairs :
|
||||
|
@ -3,7 +3,7 @@
|
||||
### Overview
|
||||
|
||||
- Queue implementation which grows when you add elements.
|
||||
- Add/remove from head/tail is possible so it can be used as list, stack,
|
||||
- Add/remove from head/tail is possible, so it can be used as list, stack,
|
||||
queue, dequeue etc.
|
||||
- It comes with predefined types, check out at the end of sc_queue.h, you can
|
||||
add there (sc_queue_def) if you need more.
|
||||
|
@ -5,8 +5,8 @@
|
||||
- Signal handling to handle shutdown and fatal signals.
|
||||
- Also provides signal safe snprintf/vsnprintf.
|
||||
- On shutdown signal, writes 1 byte to a fd which is set by user, so your app
|
||||
can shutdown properly.
|
||||
- Double shutdown signal handling: e.g user presses CTRL+C twice, exits without
|
||||
can shut down properly.
|
||||
- Double shutdown signal handling: e.g. user presses CTRL+C twice, exits without
|
||||
waiting graceful shutdown.
|
||||
- Fatal signal handling. Prints backtrace with program counter indicator. You
|
||||
should compile with debug symbols or with -rdynamic for GCC.
|
||||
|
@ -5,10 +5,10 @@
|
||||
- Includes three implementations :
|
||||
|
||||
| Implementation | Description |
|
||||
|-------------------|----------------------------------------------------------|
|
||||
|------------------|-----------------------------------------------------------|
|
||||
| sc_sock_xxx | TCP socket wrapper for blocking and nonblocking sockets |
|
||||
| sc_sock_poll_xxx | Epoll / Kqueue / WSAPoll wrapper |
|
||||
| sc_sock_pipe_xxx | Unix pipe() and an equivalent implementation for Windows.|
|
||||
| sc_sock_pipe_xxx | Unix pipe() and an equivalent implementation for Windows. |
|
||||
|
||||
|
||||
- Works for IPv4, IPv6 and Unix domain sockets. (~ Windows 10 2018 added Unix
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
### Overview
|
||||
|
||||
- URI parser but not a full featured one. It just splits parts of an url.
|
||||
- URI parser but not a full-featured one. It just splits parts of an url.
|
||||
- Internally, it does a single allocation but each part is represented as null
|
||||
ended string, so it plays nicely with C string functions.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user