58 lines
2.8 KiB
XML
58 lines
2.8 KiB
XML
<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="500" viewBox="0 0 1200 500" role="img" aria-labelledby="title desc">
|
|
<title id="title">WebSocket in OSI model</title>
|
|
<desc id="desc">A compact OSI stack showing WebSocket at the application layer over TCP/IP.</desc>
|
|
<defs>
|
|
<style>
|
|
@font-face {
|
|
font-family: "Vazirmatn";
|
|
src: url("../../../app/static/Vazirmatn[wght].woff2") format("woff2");
|
|
font-weight: 100 900;
|
|
}
|
|
text { font-family: "Vazirmatn", Arial, sans-serif; }
|
|
.layer { fill: #f8fafc; font-size: 18px; font-weight: 850; }
|
|
.value { fill: #a8adbd; font-size: 18px; font-weight: 500; }
|
|
.strong { fill: #ffffff; font-size: 19px; font-weight: 850; }
|
|
.strongValue { fill: #ffffff; font-size: 19px; font-weight: 500; }
|
|
.mutedRow { fill: #ffffff; opacity: .08; stroke: #ffffff; }
|
|
</style>
|
|
<filter id="shadow" x="-20%" y="-20%" width="140%" height="140%">
|
|
<feDropShadow dx="0" dy="18" stdDeviation="18" flood-color="#0f172a" flood-opacity=".16"/>
|
|
</filter>
|
|
</defs>
|
|
|
|
<rect width="1200" height="500" fill="#262a3a"/>
|
|
<path d="M42 396 L258 286 L374 438 L92 532 Z" fill="#f4b740" opacity=".13"/>
|
|
<path d="M880 42 L1146 112 L1030 262 L812 182 Z" fill="#6d8cff" opacity=".16"/>
|
|
|
|
<!-- Diagram is intentionally placed slightly above center, with all rows inside the outer panel. -->
|
|
<g id="diagram-content">
|
|
<g filter="url(#shadow)">
|
|
<rect x="150" y="80" width="900" height="350" rx="30" fill="#ffffff" opacity=".08" stroke="#ffffff"/>
|
|
</g>
|
|
|
|
<rect x="190" y="105" width="820" height="48" rx="15" fill="#2563eb"/>
|
|
<text x="222" y="136" class="strong">Layer 7 - Application</text>
|
|
<text x="712" y="136" class="strongValue">WebSocket - JSON - Chat</text>
|
|
|
|
<rect x="190" y="165" width="820" height="40" rx="14" class="mutedRow"/>
|
|
<text x="222" y="191" class="layer">Layer 6 - Presentation</text>
|
|
<text x="712" y="191" class="value">UTF-8 - Text</text>
|
|
|
|
<rect x="190" y="215" width="820" height="40" rx="14" class="mutedRow"/>
|
|
<text x="222" y="241" class="layer">Layer 5 - Session</text>
|
|
<text x="712" y="241" class="value">Long-lived conversation</text>
|
|
|
|
<rect x="190" y="265" width="820" height="48" rx="15" fill="#10b981"/>
|
|
<text x="222" y="296" class="strong">Layer 4 - Transport</text>
|
|
<text x="712" y="296" class="strongValue">TCP reliable stream</text>
|
|
|
|
<rect x="190" y="325" width="820" height="40" rx="14" class="mutedRow"/>
|
|
<text x="222" y="351" class="layer">Layer 3 - Network</text>
|
|
<text x="712" y="351" class="value">IP routing</text>
|
|
|
|
<rect x="190" y="375" width="820" height="40" rx="14" class="mutedRow"/>
|
|
<text x="222" y="401" class="layer">Layers 2-1 - Link / Physical</text>
|
|
<text x="712" y="401" class="value">Ethernet - Wi-Fi</text>
|
|
</g>
|
|
</svg>
|