# bluedog001/books architecture

> Architecture diagram of the GitHub repository bluedog001/books, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bluedog001/books
- Repository: https://github.com/bluedog001/books

## Overview

This repository is a collection of instructional code samples, not one integrated application. Its main user-to-result pattern is to run an individual networking example, which exercises a protocol or API and produces communication, system/network information, or packet output. The examples span Unix and Windows networking, plus a small sorting sample and a large set of Guoxue data classes. The graph groups related examples rather than implying a shared runtime. Connections are limited to relationships visible in the supplied excerpts or SOURCE INDEX; many samples were not inspected.

Main entry points: [`network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/Myrouter.cpp) (Serial Router), [`network/Unix网络编程技术与分析/prg10_1/chat.cpp`](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/chat.cpp) (TCP Chat Server), [`network/Windows网络编程 - 源代码/Chapter07/IrDA/Irclient.c`](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter07/IrDA/Irclient.c) (IrDA Client), [`network/Windows网络编程 - 源代码/Chapter12/qostcp.c`](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter12/qostcp.c) (QoS TCP)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_unix["Unix Networking"]
  node_tcpchat["TCP Chat Server<br/>[chat.cpp]"]
  node_chatqueue["Message Queue<br/>[chat.cpp]"]
  node_socketwrap["Socket Wrapper<br/>[mysocket.cpp]"]
  node_serialrouter["Serial Router<br/>[Myrouter.cpp]"]
  node_serialdevice["Serial Device<br/>[mydevice.h]"]
  node_serialcomm["Serial Port I/O<br/>[serialcomm.cpp]"]
  node_routeroute["Route Lookup<br/>[myroute.cpp]"]
  node_rawip["Raw IP<br/>[myraw.cpp]"]
  node_unixexamples["Unix Socket Examples"]
end

subgraph group_windows["Windows Networking"]
  node_irclient["IrDA Client<br/>[Irclient.c]"]
  node_tcpudp["TCP UDP Samples"]
  node_asyncio["Socket I/O Samples"]
  node_networktools["Network Utilities"]
end

subgraph group_advanced["Advanced Networking"]
  node_qostcp["QoS TCP<br/>[qostcp.c]"]
  node_qosconfig["QoS Definitions<br/>[printqos.h]"]
  node_rcvall["Packet Capture Parser<br/>[parser.c]"]
  node_capturedefs["Capture Definitions<br/>[parser.h]"]
  node_lsp["Layered Provider<br/>[main.cpp]"]
  node_providerdefs["Provider Definitions<br/>[provider.h]"]
end

subgraph group_other["Other Samples"]
  node_sort["Sorting Example<br/>[sorting.cpp]"]
  node_guoxue["Guoxue Data"]
end

node_operator(("Example User"))
node_socketapi(("Socket API"))
node_irpeers(("IrDA Devices"))

node_operator -->|"runs example"| node_tcpchat
node_tcpchat -->|"adds and retrieves"| node_chatqueue
node_tcpchat -->|"sends and receives"| node_socketapi
node_operator -->|"starts router"| node_serialrouter
node_serialrouter -->|"reads and writes"| node_serialdevice
node_serialrouter -->|"checks routes"| node_routeroute
node_serialrouter -->|"sends packets"| node_rawip
node_operator -.->|"runs example"| node_unixexamples
node_operator -->|"runs client"| node_irclient
node_irclient -->|"discovers and connects"| node_irpeers
node_operator -.->|"runs example"| node_tcpudp
node_operator -.->|"runs example"| node_asyncio
node_operator -.->|"runs utility"| node_networktools
node_operator -->|"runs example"| node_qostcp
node_qostcp -->|"uses definitions"| node_qosconfig
node_rcvall -->|"uses declarations"| node_capturedefs
node_lsp -->|"uses declarations"| node_providerdefs
node_operator -.->|"runs example"| node_sort

click node_tcpchat "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/chat.cpp"
click node_chatqueue "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/chat.cpp"
click node_socketwrap "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/mysocket.cpp"
click node_serialrouter "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/Myrouter.cpp"
click node_serialdevice "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/mydevice.h"
click node_serialcomm "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/serialcomm.cpp"
click node_routeroute "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/myroute.cpp"
click node_rawip "https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/myraw.cpp"
click node_unixexamples "https://github.com/bluedog001/books/tree/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90"
click node_irclient "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter07/IrDA/Irclient.c"
click node_tcpudp "https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter07"
click node_asyncio "https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter08"
click node_networktools "https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/AppendixB"
click node_qostcp "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter12/qostcp.c"
click node_qosconfig "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter12/printqos.h"
click node_rcvall "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter09/SIO_RCVALL/parser.c"
click node_capturedefs "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter09/SIO_RCVALL/parser.h"
click node_lsp "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter14/LSP/lsp/main.cpp"
click node_providerdefs "https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter14/LSP/lsp/provider.h"
click node_sort "https://github.com/bluedog001/books/blob/master/c/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84(C%E5%AE%9E%E7%8E%B0)/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%AE%B2%E4%B9%89/sorting.cpp"
click node_guoxue "https://github.com/bluedog001/books/tree/master/%E5%9B%BD%E5%AD%A6/data"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_tcpchat,node_chatqueue,node_socketwrap,node_serialrouter,node_serialdevice,node_serialcomm,node_routeroute,node_rawip,node_unixexamples,node_operator toneBlue
class node_irclient,node_tcpudp,node_asyncio,node_networktools toneAmber
class node_qostcp,node_qosconfig,node_rcvall,node_capturedefs,node_lsp,node_providerdefs,node_socketapi toneMint
class node_sort,node_guoxue toneRose
class node_irpeers toneIndigo
```

## Components

### Unix Networking

- [TCP Chat Server](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/chat.cpp): `network/Unix网络编程技术与分析/prg10_1/chat.cpp`
- [Message Queue](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/chat.cpp): `network/Unix网络编程技术与分析/prg10_1/chat.cpp`
- [Socket Wrapper](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg10_1/mysocket.cpp): `network/Unix网络编程技术与分析/prg10_1/mysocket.cpp`
- [Serial Router](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/Myrouter.cpp): `network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`
- [Serial Device](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/mydevice.h): `network/Unix网络编程技术与分析/prg16_1/mydevice.h`
- [Serial Port I/O](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/serialcomm.cpp): `network/Unix网络编程技术与分析/prg16_1/serialcomm.cpp`
- [Route Lookup](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/myroute.cpp): `network/Unix网络编程技术与分析/prg16_1/myroute.cpp`
- [Raw IP](https://github.com/bluedog001/books/blob/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90/prg16_1/myraw.cpp): `network/Unix网络编程技术与分析/prg16_1/myraw.cpp`
- [Unix Socket Examples](https://github.com/bluedog001/books/tree/master/network/Unix%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%E6%8A%80%E6%9C%AF%E4%B8%8E%E5%88%86%E6%9E%90): `network/Unix网络编程技术与分析`

### Windows Networking

- [IrDA Client](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter07/IrDA/Irclient.c): `network/Windows网络编程 - 源代码/Chapter07/IrDA/Irclient.c`
- [TCP UDP Samples](https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter07): `network/Windows网络编程 - 源代码/Chapter07`
- [Socket I/O Samples](https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter08): `network/Windows网络编程 - 源代码/Chapter08`
- [Network Utilities](https://github.com/bluedog001/books/tree/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/AppendixB): `network/Windows网络编程 - 源代码/AppendixB`

### Advanced Networking

- [QoS TCP](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter12/qostcp.c): `network/Windows网络编程 - 源代码/Chapter12/qostcp.c`
- [QoS Definitions](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter12/printqos.h): `network/Windows网络编程 - 源代码/Chapter12/printqos.h`
- [Packet Capture Parser](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter09/SIO_RCVALL/parser.c): `network/Windows网络编程 - 源代码/Chapter09/SIO_RCVALL/parser.c`
- [Capture Definitions](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter09/SIO_RCVALL/parser.h): `network/Windows网络编程 - 源代码/Chapter09/SIO_RCVALL/parser.h`
- [Layered Provider](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter14/LSP/lsp/main.cpp): `network/Windows网络编程 - 源代码/Chapter14/LSP/lsp/main.cpp`
- [Provider Definitions](https://github.com/bluedog001/books/blob/master/network/Windows%E7%BD%91%E7%BB%9C%E7%BC%96%E7%A8%8B%20-%20%E6%BA%90%E4%BB%A3%E7%A0%81/Chapter14/LSP/lsp/provider.h): `network/Windows网络编程 - 源代码/Chapter14/LSP/lsp/provider.h`

### Other Samples

- [Sorting Example](https://github.com/bluedog001/books/blob/master/c/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84(C%E5%AE%9E%E7%8E%B0)/%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84%E8%AE%B2%E4%B9%89/sorting.cpp): `c/数据结构(C实现)/数据结构讲义/sorting.cpp`
- [Guoxue Data](https://github.com/bluedog001/books/tree/master/%E5%9B%BD%E5%AD%A6/data): `国学/data`

### Other components

- **Example User**
- **Socket API**
- **IrDA Devices**

## Connections

- Example User → TCP Chat Server: runs example (evidence: `network/Unix网络编程技术与分析/prg10_1/chat.cpp`)
- TCP Chat Server → Message Queue: adds and retrieves (evidence: `network/Unix网络编程技术与分析/prg10_1/chat.cpp`)
- TCP Chat Server → Socket API: sends and receives (evidence: `network/Unix网络编程技术与分析/prg10_1/chat.cpp`)
- Example User → Serial Router: starts router (evidence: `network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`)
- Serial Router → Serial Device: reads and writes (evidence: `network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`)
- Serial Router → Route Lookup: checks routes (evidence: `network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`)
- Serial Router → Raw IP: sends packets (evidence: `network/Unix网络编程技术与分析/prg16_1/Myrouter.cpp`)
- Example User → Unix Socket Examples: runs example
- Example User → IrDA Client: runs client (evidence: `network/Windows网络编程 - 源代码/Chapter07/IrDA/Irclient.c`)
- IrDA Client → IrDA Devices: discovers and connects (evidence: `network/Windows网络编程 - 源代码/Chapter07/IrDA/Irclient.c`)
- Example User → TCP UDP Samples: runs example
- Example User → Socket I/O Samples: runs example
- Example User → Network Utilities: runs utility
- Example User → QoS TCP: runs example (evidence: `network/Windows网络编程 - 源代码/Chapter12/qostcp.c`)
- QoS TCP → QoS Definitions: uses definitions (evidence: `network/Windows网络编程 - 源代码/Chapter12/qostcp.c`)
- Packet Capture Parser → Capture Definitions: uses declarations (evidence: `network/Windows网络编程 - 源代码/Chapter09/SIO_RCVALL/parser.c`)
- Layered Provider → Provider Definitions: uses declarations (evidence: `network/Windows网络编程 - 源代码/Chapter14/LSP/lsp/main.cpp`)
- Example User → Sorting Example: runs example
