# y1hng/wisockity architecture

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

- Interactive diagram: https://gitdiagram.com/y1hng/wisockity
- Repository: https://github.com/y1hng/wisockity

## Overview

wisockity is presented as a low-level TCP/IP binary protocol and client-server communication framework, with a 25-byte header and session rotation. The sampled code shows header packing/unpacking, payload encoding/decoding, a command-flag map, and session-ID generation. Client and server files are empty in the excerpts, and the core modules do not show how these pieces are wired together, so the graph avoids inferring runtime calls or transport flow.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_endpoints["Communication endpoints"]
  node_client["Client endpoint<br/>[client.py]"]
  node_server["Server endpoint<br/>[server.py]"]
end

subgraph group_protocol["Protocol core"]
  node_header_codec["Header packing<br/>[PACK.py]"]
  node_header_unpack["Header unpacking<br/>[UNPACK.py]"]
  node_payload_codec["Payload encoding<br/>[PACK.py]"]
  node_payload_decode["Payload decoding<br/>[UNPACK.py]"]
  node_session_id["Session ID generation<br/>[idgen.py]"]
  node_command_flags["Command flags<br/>[flags.py]"]
  node_pnn["PNN module<br/>[PNN.py]"]
end

click node_client "https://github.com/y1hng/wisockity/blob/main/wisockity/client/client.py"
click node_server "https://github.com/y1hng/wisockity/blob/main/wisockity/server/server.py"
click node_header_codec "https://github.com/y1hng/wisockity/blob/main/server/core/PACK.py"
click node_header_unpack "https://github.com/y1hng/wisockity/blob/main/server/core/UNPACK.py"
click node_payload_codec "https://github.com/y1hng/wisockity/blob/main/server/core/PACK.py"
click node_payload_decode "https://github.com/y1hng/wisockity/blob/main/server/core/UNPACK.py"
click node_session_id "https://github.com/y1hng/wisockity/blob/main/server/core/idgen.py"
click node_command_flags "https://github.com/y1hng/wisockity/blob/main/server/core/flags.py"
click node_pnn "https://github.com/y1hng/wisockity/blob/main/server/core/PNN.py"

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_client,node_server toneBlue
class node_header_codec,node_header_unpack,node_payload_codec,node_payload_decode,node_session_id,node_command_flags,node_pnn toneAmber
```

## Components

### Communication endpoints

- [Client endpoint](https://github.com/y1hng/wisockity/blob/main/wisockity/client/client.py): `wisockity/client/client.py`
- [Server endpoint](https://github.com/y1hng/wisockity/blob/main/wisockity/server/server.py): `wisockity/server/server.py`

### Protocol core

- [Header packing](https://github.com/y1hng/wisockity/blob/main/server/core/PACK.py): `server/core/PACK.py`
- [Header unpacking](https://github.com/y1hng/wisockity/blob/main/server/core/UNPACK.py): `server/core/UNPACK.py`
- [Payload encoding](https://github.com/y1hng/wisockity/blob/main/server/core/PACK.py): `server/core/PACK.py`
- [Payload decoding](https://github.com/y1hng/wisockity/blob/main/server/core/UNPACK.py): `server/core/UNPACK.py`
- [Session ID generation](https://github.com/y1hng/wisockity/blob/main/server/core/idgen.py): `server/core/idgen.py`
- [Command flags](https://github.com/y1hng/wisockity/blob/main/server/core/flags.py): `server/core/flags.py`
- [PNN module](https://github.com/y1hng/wisockity/blob/main/server/core/PNN.py): `server/core/PNN.py`
