Skip to content
This repository
Browse code

ServiceName => ServiceURL::string()

  • Loading branch information...
commit 4d33c05bf0ac5de8935bdc68f9f0942567d49f96 1 parent e177a7c
Evan Miller authored

Showing 1 changed file with 4 additions and 4 deletions. Show diff stats Hide diff stats

  1. 8  doc-src/api-websocket.html
8  doc-src/api-websocket.html
@@ -4,7 +4,7 @@
4 4
 <h2>Server code</h2>
5 5
 <p>The server WebSocket API is based around Erlang message-passing; to send a message to a particular client, simply send it a message like:</p>
6 6
 <div class="code">
7  
-    WebSocketId ! {text, &lt;&lt;"some text"&gt;&gt;}
  7
+    WebSocket ! {text, &lt;&lt;"some text"&gt;&gt;}
8 8
 </div>
9 9
 <p>To handle incoming messages from clients, you'll need to create WebSocket controllers in your project's <code>src/websocket</code> directory. Each controller module should have a name of the form <code>&lt;app name&gt;_&lt;service name&gt;_websocket.erl</code> and implement the <code>boss_service_handler</code> behavior. The <code>boss_service_handler</code> behavior consists of the following six functions:</p>
10 10
 <div class="code spec">
@@ -13,7 +13,7 @@
13 13
 <p>Initialize the service.</p>
14 14
 
15 15
 <div class="code spec">
16  
-    handle_join(ServiceName, WebSocketId::pid(), SessionId::string(), State) -&gt; <br>
  16
+    handle_join(ServiceURL::string(), WebSocket::pid(), SessionId::string(), State) -&gt; <br>
17 17
     &nbsp;&nbsp;{reply, Reply, NewState} |<br>
18 18
     &nbsp;&nbsp;{reply, Reply, NewState, Timeout} |<br>
19 19
     &nbsp;&nbsp;{noreply, NewState} |<br>
@@ -24,7 +24,7 @@
24 24
 <p>Handle a client joining a service.</p>
25 25
 
26 26
 <div class="code spec">
27  
-    handle_close(ServiceName, WebSocketId::pid(), SessionId::string(), State) -&gt; <br>
  27
+    handle_close(ServiceURL::string(), WebSocket::pid(), SessionId::string(), State) -&gt; <br>
28 28
     &nbsp;&nbsp;{reply, Reply, NewState} |<br>
29 29
     &nbsp;&nbsp;{reply, Reply, NewState, Timeout} |<br>
30 30
     &nbsp;&nbsp;{noreply, NewState} |<br>
@@ -35,7 +35,7 @@
35 35
 <p>Handle a client leaving a service.</p>
36 36
 
37 37
 <div class="code spec">
38  
-    handle_incoming(ServiceName, WebSocketId::pid(), SessionId::string(), Message, State) -&gt;<br>
  38
+    handle_incoming(ServiceURL::string(), WebSocket::pid(), SessionId::string(), Message, State) -&gt;<br>
39 39
     &nbsp;&nbsp;{noreply, NewState} |<br>
40 40
     &nbsp;&nbsp;{noreply, NewState, Timeout} |<br>
41 41
     &nbsp;&nbsp;{stop, Reason, NewState}

0 notes on commit 4d33c05

Please sign in to comment.
Something went wrong with that request. Please try again.