<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="170477" data-post-id="170477">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sb8244" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sb8244/120/18642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sb8244
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Real-Time Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="kodepett" data-post="103" data-topic="24808">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kodepett/48/13484_2.png" class="avatar"> kodepett:</div>
<blockquote>
<ul>
<li><code>Transport process</code> delegates/forward socket and other data to the <code>Socket</code> module</li>
</ul>
</blockquote>
</aside>
<p>Delegate is definitely correct here. It’s important to understand this is just a function call in the same process. It’s not crossing a process boundary here.</p>
<aside class="quote no-group" data-username="kodepett" data-post="103" data-topic="24808">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kodepett/48/13484_2.png" class="avatar"> kodepett:</div>
<blockquote>
<ul>
<li><code>Socket</code> module communicates back to the <code>Transport process</code></li>
</ul>
</blockquote>
</aside>
<p>That makes this not quite true. The “communication back” is simply the result of the delegation. See <a href="https://github.com/phoenixframework/phoenix/blob/9d7444f8cbfeb91b6d03f6e375f7be3ccd5d2d6c/lib/phoenix/socket.ex#L570" class="inline-onebox" rel="noopener nofollow ugc">phoenix/lib/phoenix/socket.ex at 9d7444f8cbfeb91b6d03f6e375f7be3ccd5d2d6c · phoenixframework/phoenix · GitHub</a> for source code there.</p>
<aside class="quote no-group" data-username="kodepett" data-post="103" data-topic="24808">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kodepett/48/13484_2.png" class="avatar"> kodepett:</div>
<blockquote>
<ul>
<li>Can I assume this will be routed directly from the <code>Transport process</code> to the <code>Channel</code> module, will the <code>Transport process</code> introspect the <code>Socket</code> module, use the <code>channel macro</code> to forward the request to the appropriate <code>Channel</code> or it’s has this information already via <code>socket</code> struct returned by <code>Socket</code> module in the initial connection setup phase?</li>
</ul>
</blockquote>
</aside>
<p>It’s way easier than that in this case. The <code>channel</code> macro sets up a bunch of functions that use pattern matching to call the right one. This means there is no lookup, it’s simply functions that exist from compilation.</p>
<p>Connected Channels on the Socket are tracked via a map. So it’s simply a lookup of topic → Channel at that point (<a href="https://github.com/phoenixframework/phoenix/blob/9d7444f8cbfeb91b6d03f6e375f7be3ccd5d2d6c/lib/phoenix/socket.ex#L467" class="inline-onebox" rel="noopener nofollow ugc">phoenix/lib/phoenix/socket.ex at 9d7444f8cbfeb91b6d03f6e375f7be3ccd5d2d6c · phoenixframework/phoenix · GitHub</a>).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="170477" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/104">Post #103</a>
	                </div>
	            </div>
              <div id="likers-container-170477" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="170477"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #103"></div>
  </section>
</div>
    <div class="postbit" id="170484" data-post-id="170484">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kodepett" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kodepett/120/13484_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kodepett
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I think I have the right picture now, your assertion on the “communication back” is correct; the return value of the <code>connect</code> function to the <code>Transport process</code> from the <code>Socket</code> module. Subsequently the <code>Transport process</code> uses pattern matching setup within the <code>Socket</code> module by the <code>channel macro</code>  to invoke the right <code>Channel</code>. In effect we have two processes - (Transport and Channel with the Socket module acting as a link via it functions between them.)</p>
<p><a class="mention" href="/u/sb8244" rel="nofollow">@sb8244</a>, I was hoping to get some input from you on the above, hope I’m on the right path and thanks a lot for the wonderful work and also taken time to assist. I’m most grateful.<br>
Thanks Steve.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="170484" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/105">Post #104</a>
	                </div>
	            </div>
              <div id="likers-container-170484" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="170484"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #104"></div>
  </section>
</div>
    <div class="postbit" id="171055" data-post-id="171055">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Internets" src="/assets/icons/user-9f439610.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Internets
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>I’m working through this book and it’s great.</p>
<p>I have a question about acceptance tests and discrepancy between what the book says and what it says in the <a href="https://hexdocs.pm/phoenix_ecto/Phoenix.Ecto.SQL.Sandbox.html" rel="noopener nofollow ugc">docs for Ecto SQL Sandbox.</a></p>
<p>The docs say it is important to put the Sandbox plug at the top of endpoint.ex before any other plugs. However the book says to put it as the final plug definition in that file.</p>
<p>Is there a reason to put it last instead of first?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171055" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/106">Post #105</a>
	                </div>
	            </div>
              <div id="likers-container-171055" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171055"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #105"></div>
  </section>
</div>
    <div class="postbit" id="171077" data-post-id="171077">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sb8244" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sb8244/120/18642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sb8244
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Real-Time Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Internets" data-post="106" data-topic="24808">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/letter_avatar_proxy/v4/letter/i/85e7bf/48.png" class="avatar"> Internets:</div>
<blockquote>
<p>The docs say it is important to put the Sandbox plug at the top of endpoint.ex before any other plugs. However the book says to put it as the final plug definition in that file.</p>
<p>Is there a reason to put it last instead of first?</p>
</blockquote>
</aside>
<p>I would suggest following the docs in this case—I clearly missed that. Reading the code, the edge cases would come up if you were using the database in another Plug, since you wouldn’t have a connection. That’s not the case for our project, but may happen in one of yours.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171077" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/107">Post #106</a>
	                </div>
	            </div>
              <div id="likers-container-171077" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171077"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #106"></div>
  </section>
</div>
    <div class="postbit" id="171788" data-post-id="171788">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Enuzo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Enuzo/120/26762_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Enuzo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Why is <code>iex(1)&gt; HelloSocketsWeb.Endpoint.broadcast("ping", "test", %{data: "test"})</code> throwing this error message: <code>Disconnected (code: 1011, reason: "")</code> ?<br>
So far, all the examples I’ve run have been working well. Here’s the setup:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">##lib/hello_sockets_web/channels/ping_channel.ex
   channel "ping", HelloSocketsWeb.PingChannel
   channel "ping:*", HelloSocketsWeb.PingChannel
   channel "wild:*", HelloSocketsWeb.WildcardChannel
</code></pre>
<pre data-code-wrap="elixir"><code class="lang-elixir">## lib/hello_sockets_web/channels/ping_channel.ex
defmodule HelloSocketsWeb.PingChannel do
	use Phoenix.Channel

	def join(_topic, _payload, socket) do
		{:ok, socket}
	end

	def handle_in("ping", _payload, socket) do
		{:reply, {:ok, %{ping: "pong"}}, socket}
	end
end
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171788" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/108">Post #107</a>
	                </div>
	            </div>
              <div id="likers-container-171788" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171788"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #107"></div>
  </section>
</div>
    <div class="postbit" id="171801" data-post-id="171801">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="pau-riosa" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pau-riosa/120/18838_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  pau-riosa
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Does the discount code still available?</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171801" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/109">Post #108</a>
	                </div>
	            </div>
              <div id="likers-container-171801" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171801"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #108"></div>
  </section>
</div>
    <div class="postbit" id="171810" data-post-id="171810">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sb8244" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sb8244/120/18642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sb8244
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Real-Time Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<aside class="quote no-group" data-username="Enuzo" data-post="108" data-topic="24808">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/enuzo/48/26762_2.png" class="avatar"> Enuzo:</div>
<blockquote>
<p>Why is <code>iex(1)&gt; HelloSocketsWeb.Endpoint.broadcast("ping", "test", %{data: "test"})</code> throwing this error message: <code>Disconnected (code: 1011, reason: "")</code> ?</p>
</blockquote>
</aside>
<p>Where is this error code coming from? If it’s coming from the wscat session, that is because you have to send data over it within ~40 seconds or it disconnects.</p>
<aside class="quote no-group" data-username="pau-riosa" data-post="109" data-topic="24808" data-full="true">
<div class="title">
<div class="quote-controls"></div>
<img alt="" width="24" height="24" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/pau-riosa/48/18838_2.png" class="avatar"> pau-riosa:</div>
<blockquote>
<p>Does the discount code still available?</p>
</blockquote>
</aside>
<p>The only discounts I know of are from the sister forum (not sure if they want me posting here), or if you’ve ever bought a Pragmatic book before (coupon in the back to buy another for 30% off).</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171810" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/110">Post #109</a>
	                </div>
	            </div>
              <div id="likers-container-171810" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171810"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #109"></div>
  </section>
</div>
    <div class="postbit" id="171834" data-post-id="171834">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Enuzo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Enuzo/120/26762_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Enuzo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>Yes, the error is coming from wscat. I tried again while timing it with a stopwatch but it keeps generating the same error in less than 40 secs. I have my terminal split to two: one running <code>$ iex -S mix phx.server</code> and the other running <code>wscat</code>. The terminal running phoenix is all in red when the <code>wscat</code> returns the <code>Disconnected (code: 1011, reason: "")</code> error.<br>
Here is the error message from the phoenix server:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">[error] GenServer #PID&lt;0.431.0&gt; terminating
** (Jason.DecodeError) unexpected byte at position 0: 0x48 ('H')
    (jason 1.2.0) lib/jason.ex:78: Jason.decode!/2
    (phoenix 1.4.16) lib/phoenix/socket/serializers/v2_json_serializer.ex:30: Phoenix.Socket.V2.JSONSerializer.decode!/2
    (phoenix 1.4.16) lib/phoenix/socket.ex:564: Phoenix.Socket.__in__/2
    (phoenix 1.4.16) lib/phoenix/endpoint/cowboy2_handler.ex:120: Phoenix.Endpoint.Cowboy2Handler.websocket_handle/2
    (cowboy 2.7.0) /home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_websocket.erl:482: :cowboy_websocket.handler_call/6
    (cowboy 2.7.0) /home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_http.erl:231: :cowboy_http.loop/1
    (stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {:DOWN, #Reference&lt;0.589201659.3935567875.121381&gt;, :process, #PID&lt;0.428.0&gt;, {%Jason.DecodeError{data: "HelloSocketsWeb.Endpoint.broadcast(\"ping\", \"test\", %{data: \"test\"})", position: 0, token: nil}, [{Jason, :decode!, 2, [file: 'lib/jason.ex', line: 78]}, {Phoenix.Socket.V2.JSONSerializer, :decode!, 2, [file: 'lib/phoenix/socket/serializers/v2_json_serializer.ex', line: 30]}, {Phoenix.Socket, :__in__, 2, [file: 'lib/phoenix/socket.ex', line: 564]}, {Phoenix.Endpoint.Cowboy2Handler, :websocket_handle, 2, [file: 'lib/phoenix/endpoint/cowboy2_handler.ex', line: 120]}, {:cowboy_websocket, :handler_call, 6, [file: '/home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_websocket.erl', line: 482]}, {:cowboy_http, :loop, 1, [file: '/home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_http.erl', line: 231]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}}
State: %Phoenix.Socket{assigns: %{}, channel: HelloSocketsWeb.PingChannel, channel_pid: #PID&lt;0.431.0&gt;, endpoint: HelloSocketsWeb.Endpoint, handler: HelloSocketsWeb.UserSocket, id: nil, join_ref: "1", joined: true, private: %{log_handle_in: :debug, log_join: :info}, pubsub_server: HelloSockets.PubSub, ref: nil, serializer: Phoenix.Socket.V2.JSONSerializer, topic: "ping", transport: :websocket, transport_pid: #PID&lt;0.428.0&gt;}
[error] Ranch listener HelloSocketsWeb.Endpoint.HTTP had connection process started with :cowboy_clear:start_link/4 at #PID&lt;0.428.0&gt; exit with reason: {%Jason.DecodeError{data: "HelloSocketsWeb.Endpoint.broadcast(\"ping\", \"test\", %{data: \"test\"})", position: 0, token: nil}, [{Jason, :decode!, 2, [file: 'lib/jason.ex', line: 78]}, {Phoenix.Socket.V2.JSONSerializer, :decode!, 2, [file: 'lib/phoenix/socket/serializers/v2_json_serializer.ex', line: 30]}, {Phoenix.Socket, :__in__, 2, [file: 'lib/phoenix/socket.ex', line: 564]}, {Phoenix.Endpoint.Cowboy2Handler, :websocket_handle, 2, [file: 'lib/phoenix/endpoint/cowboy2_handler.ex', line: 120]}, {:cowboy_websocket, :handler_call, 6, [file: '/home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_websocket.erl', line: 482]}, {:cowboy_http, :loop, 1, [file: '/home/uzisky/_phx/hello_sockets/deps/cowboy/src/cowboy_http.erl', line: 231]}, {:proc_lib, :init_p_do_apply, 3, [file: 'proc_lib.erl', line: 249]}]}
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171834" data-batch-url="/posts/batch_likers">
                        0
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/111">Post #110</a>
	                </div>
	            </div>
              <div id="likers-container-171834" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171834"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #110"></div>
  </section>
</div>
    <div class="postbit" id="171837" data-post-id="171837">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="sb8244" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/sb8244/120/18642_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  sb8244
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>Author of Real-Time Phoenix</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p>It looks like you copied the <code>broadcast</code> function into the wscat process rather than the <code>iex</code> terminal:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">%Jason.DecodeError{data: "HelloSocketsWeb.Endpoint.broadcast(\"ping\", \"test\", %{data: \"test\"})", position: 0, token: nil}
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171837" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/112">Post #111</a>
	                </div>
	            </div>
              <div id="likers-container-171837" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171837"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #111"></div>
  </section>
</div>
    <div class="postbit" id="171842" data-post-id="171842">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="Enuzo" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/Enuzo/120/26762_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  Enuzo
                  </h3>
		          </div>
						
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><img src="https://forum.elixirforum.com/images/emoji/apple/man_facepalming.png?v=15" title=":man_facepalming:" class="emoji" alt=":man_facepalming:" loading="lazy" width="20" height="20"> That’s correct. Thanks.</p> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="171842" data-batch-url="/posts/batch_likers">
                        1
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/real-time-phoenix-pragprog/24808/113">Post #112</a>
	                </div>
	            </div>
              <div id="likers-container-171842" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="171842"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-standard-post cat-standard-post" title="Post #112"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <a class="load-more-button" data-turbo-stream="true" href="/topics/24808/load_more?page=12">Load more posts (30 remaining)</a>
</div></template></turbo-stream>