diff options
author | Determinant <tederminant@gmail.com> | 2018-07-25 19:48:09 -0400 |
---|---|---|
committer | Determinant <tederminant@gmail.com> | 2018-07-25 19:48:09 -0400 |
commit | 9cc990a009a4702edf805dc5818bf4cbfffcf140 (patch) | |
tree | d327f62805d7126300568300e49b7b009b1495bd /README.rst | |
parent | 1b006d5164c605ef44652b4442309983bfc0d24a (diff) |
add MsgNetwork benchmark
Diffstat (limited to 'README.rst')
-rw-r--r-- | README.rst | 25 |
1 files changed, 25 insertions, 0 deletions
@@ -23,6 +23,31 @@ Features - Utilities. The library also provides with some useful gadgets, such as command-line parser, libevent abstraction, etc. +Functionalities +--------------- + +- `ConnPool`: A byte level connection pool implementation, the `ConnPool::Conn` + (or `ConnPool::conn_t`) objects represent a connection to which one can + send/receive a binary stream of data asynchronously. + +- `MsgNetwork<OpcodeType>`: A message level network pool implementation, the + `MsgNetwork::Conn` (or `MsgNetwork::cont_t`) objects represent a channel to + which one can send/receive a predefined message. Message handler functions + are registered by `reg_handler()` and invoked upon receiving a new message. + `OpcodeType` is the type used for identifying message types. A vald message + type must have `opcode` value as its static member and `serialized` as a + member typed `DataStream` which contains the serialized data of the message. + +- `PeerNetwork<OpcodeType>`: A simple P2P network pool implementation. It will + ensure exactly one underlying bi-directional connection is established per + added peer, and retry the connection when it is broken. Ping-pong messages + are utilized to test the connectivity at the application layer. + +- `ClientNetwork<OpcodeType>`: A simple client-server network pool + implementation. A server who initialy calls `listen()` will accept the + incoming client messages, while a client simply calls `connect()` to connect + to a known server. + Dependencies ------------ |