# openarkstudio/pss_asio architecture

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

- Interactive diagram: https://gitdiagram.com/openarkstudio/pss_asio
- Repository: https://github.com/openarkstudio/pss_asio

## Overview

PSS is a plug-in-managed I/O framework: configure or create network services, accept or establish connections, parse incoming packets, and dispatch application logic through dynamically loaded plugins. The graph preserves the documented TCP, UDP, KCP, serial, HTTP, WebSocket, and SSL capabilities, plus packet-parse and logic plugins. Source-index references establish several core dependencies; README-described capabilities are included, but unsampled implementation details and their call paths are left unverified.

Main entry points: [`PSS_ASIO/Message/SessionService.cpp`](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/SessionService.cpp) (Plugin session API), [`PSS_ASIO/TcpSession`](https://github.com/openarkstudio/pss_asio/tree/master/PSS_ASIO/TcpSession) (Transport sessions), [`PSS_ASIO/Common/NetSvrManager.cpp`](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Common/NetSvrManager.cpp) (Service manager), [`PSS_ASIO/Message/ModuleLogic.h`](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/ModuleLogic.h) (Logic dispatch)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["I/O runtime"]
  node_config["Service configuration<br/>[serverconfig.h]"]
  node_manager["Service manager<br/>[NetSvrManager.cpp]"]
  node_transports["Transport sessions"]
  node_queue["Queue service<br/>[Queueservice.cpp]"]
end

subgraph group_dispatch["Session and dispatch"]
  node_session_api["Plugin session API<br/>[SessionService.cpp]"]
  node_session_iface["Session contract<br/>[ISessionService.h]"]
  node_io_bridge["I/O bridge<br/>[Iobridge.h]"]
  node_logic["Logic dispatch<br/>[ModuleLogic.h]"]
  node_shared_queue[("Shared-memory queue<br/>[QueueService.h]")]
end

subgraph group_plugins["Plugin processing"]
  node_packet_loader["Packet parser loader<br/>[LoadPacketParse.h]"]
  node_packet_plugin["Packet-parse plugin"]
  node_http_parser["HTTP parser<br/>[http_parser.c]"]
  node_logic_plugin["Logic plugin<br/>[BaseCommand.cpp]"]
end

subgraph group_tools["Plugin tooling"]
  node_plugin_maker["Logic plugin tool"]
end

node_operator(("Framework user"))
node_client(("Network peer"))

node_operator -->|"configures"| node_config
node_config -->|"starts services"| node_manager
node_manager -->|"manages listeners"| node_transports
node_client -->|"exchanges data"| node_transports
node_transports -->|"parses packets"| node_packet_loader
node_transports -->|"dispatches data"| node_logic
node_packet_loader -.->|"loads parser"| node_packet_plugin
node_packet_plugin -.->|"may use"| node_http_parser
node_logic -.->|"runs logic"| node_logic_plugin
node_session_api -->|"implements"| node_session_iface
node_session_api -->|"delegates logic"| node_logic
node_session_api -->|"delegates mapping"| node_io_bridge
node_session_api -->|"controls services"| node_manager
node_session_api -->|"delegates queue"| node_queue
node_queue -->|"uses shared queue"| node_shared_queue
node_operator -->|"creates plugin"| node_plugin_maker

click node_config "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Common/serverconfig.h"
click node_manager "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Common/NetSvrManager.cpp"
click node_transports "https://github.com/openarkstudio/pss_asio/tree/master/PSS_ASIO/TcpSession"
click node_queue "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/QueueSession/Queueservice.cpp"
click node_session_api "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/SessionService.cpp"
click node_session_iface "https://github.com/openarkstudio/pss_asio/blob/master/Common/ISessionService.h"
click node_io_bridge "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/Iobridge.h"
click node_logic "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/ModuleLogic.h"
click node_packet_loader "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/LoadPacketParse.h"
click node_packet_plugin "https://github.com/openarkstudio/pss_asio/blob/master/PacketParse_Interface/PacketParse_Interface.cpp"
click node_http_parser "https://github.com/openarkstudio/pss_asio/blob/master/PacketParse_Http/http_parser.c"
click node_logic_plugin "https://github.com/openarkstudio/pss_asio/blob/master/Module_Logic/Test_Logic/BaseCommand.cpp"
click node_plugin_maker "https://github.com/openarkstudio/pss_asio/blob/master/PSS_PLUGIN_LOGIC_MAKER/read_logic_json_info.cpp"
click node_shared_queue "https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/QueueSession/QueueService.h"

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_config,node_manager,node_transports,node_queue,node_operator toneBlue
class node_session_api,node_session_iface,node_io_bridge,node_logic,node_shared_queue toneAmber
class node_packet_loader,node_packet_plugin,node_http_parser,node_logic_plugin toneMint
class node_plugin_maker toneRose
class node_client toneIndigo
```

## Components

### I/O runtime

- [Service configuration](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Common/serverconfig.h): `PSS_ASIO/Common/serverconfig.h`
- [Service manager](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Common/NetSvrManager.cpp): `PSS_ASIO/Common/NetSvrManager.cpp`
- [Transport sessions](https://github.com/openarkstudio/pss_asio/tree/master/PSS_ASIO/TcpSession): `PSS_ASIO/TcpSession`
- [Queue service](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/QueueSession/Queueservice.cpp): `PSS_ASIO/QueueSession/Queueservice.cpp`

### Session and dispatch

- [Plugin session API](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/SessionService.cpp): `PSS_ASIO/Message/SessionService.cpp`
- [Session contract](https://github.com/openarkstudio/pss_asio/blob/master/Common/ISessionService.h): `Common/ISessionService.h`
- [I/O bridge](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/Iobridge.h): `PSS_ASIO/Message/Iobridge.h`
- [Logic dispatch](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/ModuleLogic.h): `PSS_ASIO/Message/ModuleLogic.h`
- [Shared-memory queue](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/QueueSession/QueueService.h): `PSS_ASIO/QueueSession/QueueService.h`

### Plugin processing

- [Packet parser loader](https://github.com/openarkstudio/pss_asio/blob/master/PSS_ASIO/Message/LoadPacketParse.h): `PSS_ASIO/Message/LoadPacketParse.h`
- [Packet-parse plugin](https://github.com/openarkstudio/pss_asio/blob/master/PacketParse_Interface/PacketParse_Interface.cpp): `PacketParse_Interface/PacketParse_Interface.cpp`
- [HTTP parser](https://github.com/openarkstudio/pss_asio/blob/master/PacketParse_Http/http_parser.c): `PacketParse_Http/http_parser.c`
- [Logic plugin](https://github.com/openarkstudio/pss_asio/blob/master/Module_Logic/Test_Logic/BaseCommand.cpp): `Module_Logic/Test_Logic/BaseCommand.cpp`

### Plugin tooling

- [Logic plugin tool](https://github.com/openarkstudio/pss_asio/blob/master/PSS_PLUGIN_LOGIC_MAKER/read_logic_json_info.cpp): `PSS_PLUGIN_LOGIC_MAKER/read_logic_json_info.cpp`

### Other components

- **Framework user**
- **Network peer**

## Connections

- Framework user → Service configuration: configures
- Service configuration → Service manager: starts services
- Service manager → Transport sessions: manages listeners
- Network peer → Transport sessions: exchanges data
- Transport sessions → Packet parser loader: parses packets (evidence: `PSS_ASIO/TcpSession/TcpSSLClientSession.h`)
- Transport sessions → Logic dispatch: dispatches data (evidence: `PSS_ASIO/TcpSession/TcpSSLClientSession.h`)
- Packet parser loader → Packet-parse plugin: loads parser
- Packet-parse plugin → HTTP parser: may use
- Logic dispatch → Logic plugin: runs logic
- Plugin session API → Session contract: implements
- Plugin session API → Logic dispatch: delegates logic
- Plugin session API → I/O bridge: delegates mapping
- Plugin session API → Service manager: controls services
- Plugin session API → Queue service: delegates queue
- Queue service → Shared-memory queue: uses shared queue (evidence: `PSS_ASIO/QueueSession/QueueService.h`)
- Framework user → Logic plugin tool: creates plugin
