jackyfkc.github.io

教土豆学计算机

Protocol

Frame Details

General frame format

0      1         3             7                size+7 size+8
+------+---------+-------------+ +------------+ +-----------+
| type | channel | size        | | payload    | | frame-end |
+------+---------+-------------+ +------------+ +-----------+
 octet     short    long           size octets      octet

Client Architecture

          +------------------------+
          |     Application        |
          +-----------+------------+
                      |
          +------------------------+
      +---|       API Layer        |----Client API Layer-----+
      |   +-----------+------------+                         |
      |               |                                      |
      |   +------------------------+    +---------------+    |
      |   |    Connection Manager  +----+ Framing Layer |    |
      |   +-----------+------------+    +---------------+    |
      |               |                                      |
      |   +------------------------+                         |
      +---| Asynchronous I/O Layer |-------------------------+
          +-----------+------------+
                      |
                   -------
           - - - - Network - - - -
                   -------