<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>WebSockets on Simple Enough Blog</title><link>https://blog-dev.simpleenough.net/tags/websockets/</link><description>Recent content in WebSockets on Simple Enough Blog</description><generator>Hugo</generator><language>en</language><lastBuildDate>Mon, 21 Apr 2025 16:06:29 +0200</lastBuildDate><atom:link href="https://blog-dev.simpleenough.net/tags/websockets/index.xml" rel="self" type="application/rss+xml"/><item><title>Real-Time, Real-Easy: Deploying WebSockets</title><link>https://blog-dev.simpleenough.net/blog/websocket/</link><pubDate>Mon, 21 Apr 2025 16:06:29 +0200</pubDate><guid>https://blog-dev.simpleenough.net/blog/websocket/</guid><description>&lt;h2 id="i-websocket-protocol-architecture-and-workflow" class="heading">I. WebSocket Protocol Architecture and Workflow&lt;a href="#i-websocket-protocol-architecture-and-workflow" aria-labelledby="i-websocket-protocol-architecture-and-workflow">
&lt;!-- &lt;i class="fas fa-link anchor">&lt;/i> -->
 &lt;svg class="svg-inline--fa fas fa-link anchor" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 640 512">&lt;use href="#fas-link">&lt;/use>&lt;/svg>&amp;nbsp;
 &lt;/a>
&lt;/h2>
&lt;p>Establishing a WebSocket involves an initial &lt;strong>HTTP(S) handshake&lt;/strong>, followed by a &lt;strong>protocol upgrade&lt;/strong> to WebSocket.&lt;/p>




&lt;h3 id="main-steps" class="heading">Main Steps:&lt;a href="#main-steps" aria-labelledby="main-steps">
&lt;!-- &lt;i class="fas fa-link anchor">&lt;/i> -->
 &lt;svg class="svg-inline--fa fas fa-link anchor" fill="currentColor" aria-hidden="true" role="img" viewBox="0 0 640 512">&lt;use href="#fas-link">&lt;/use>&lt;/svg>&amp;nbsp;
 &lt;/a>
&lt;/h3>






 






&lt;table class="table">
 &lt;thead>
 
 
 &lt;tr>
 &lt;th >Step&lt;/th>
 &lt;th >Description&lt;/th>
 &lt;/tr>
 
 &lt;/thead>
 &lt;tbody>
 
 
 &lt;tr>
 &lt;td >1. HTTP Upgrade&lt;/td>
 &lt;td >The client sends an HTTP request with the &lt;code>Upgrade: websocket&lt;/code> header.&lt;/td>
 &lt;/tr>
 
 
 
 &lt;tr>
 &lt;td >2. Acceptance&lt;/td>
 &lt;td >The server validates the upgrade and switches to WebSocket mode.&lt;/td>
 &lt;/tr>
 
 
 
 &lt;tr>
 &lt;td >3. Communication&lt;/td>
 &lt;td >Data is exchanged in &lt;strong>frames&lt;/strong>, asynchronously and bidirectionally.&lt;/td>
 &lt;/tr>
 
 &lt;/tbody>
&lt;/table>&lt;p>Example upgrade request:&lt;/p></description></item></channel></rss>