flowchart id1(This is the text in the node1) id2[This is the text in the node2] db1[(database)] id1 --> id2 db1 --> id1 %% TB : top to bottom,TD %% BT: bottom to top %% RL: right to left %% LR: left to right
flowchart LR subgraph BT[Define of the nodes] id1(圆角) id2([更大的圆角]) id3[长方形] id4[(数据库)] id5((圆形)) id6>what] id7{方形} id8{{角}} id10[\梯形 Trapezoid alt/] end
subgraph LR[define of the linkes] id11[node1] id12[node2] id11 --> id12 id11 --- id12 id11 -- Text ---id12 id11 ---|Text|id12 id11-->|Text|id12 id11 -.-> id12 id11 -. text .-> id12 A == text ==> id12 a -->b & c-->d end
subgraph LR B[start] C{Is it?} B -->|yes|C C-->D[rethink] D-->B B-->|No|E[End] E[perhaps?]
end
添加图片注释,不超过 140 字(可选)
0x03 时序图 Sequence diagrams
时序图表示用户之间相互交流的过程的图表,其中的语法主要包括:参与者(Participant)、演员(Actor)、别名(Alias)、分组(Group and box)、信息(Arrows and lines)、激活(Activate)、备注(Notes)、循环(Loop)
sequenceDiagram participant Alice participant John
rect rgb(191, 223, 255) note right of Alice: Alice calls John. Alice->>+John: Hello John, how are you? rect rgb(200, 150, 255) Alice->>+John: John, can you hear me? John-->>-Alice: Hi Alice, I can hear you! end John-->>-Alice: I feel great! end Alice ->>+ John: Did you want togoto the game tonight? John -->>- Alice: Yeah! See you there. sequenceDiagram participant C as Client participant S as Server autonumber note left of C: 选择初始seq number=x<br/>发送客户端的TCP SYN段 C->>S:SYNbit=1,Seq=X note right of S:选择初始seq number=y<br/>发送服务端TCP SYN信息<br/>利用SYN+1作为回复 S->>C:SYNbit=1,Seq=Y<br/>ACKbit=1,ACKnum=x+1 note left of C:收到SYNACK(x),确认服务器存在<br/>发送ACK回复SYNACK<br/>不包含client-to-server数据 C->>S:ACKbit=1,ACKnum=y+1 note right of S:收到 ACK(y)<br/>确认用户存在