Fred T-H avatar Fred T-H committed 94f6d5b

fffffffffffuuuuuuuu

Comments (0)

Files changed (1)

 Different event handlers attached to the event manager will be dealing with routing messages:
 
 * //usr_dispatch_handler//: Takes messages you send and routes them to another user. There is only one of these per user.
-* //usr_listen_handler//: Takes any kind of message received and transmits it to the client. The format of the message is altered to be {UserId, {received, From, Message}} or {UserId, {sent, To, Message}} so a given process can hold more than one client connection. There is one handler of this kind per client and everyone of them is added with gen_event:add_sup_handler/3, which guarantees that if the client dies, the handler also dies.
+* //usr_listen_handler//: Takes any kind of message received and transmits it to the client. The format of the message is altered to be {UserId, {received, From, Message}} or {UserId, {sent, To, Message}} so a given process can hold more than one client connection. There is one handler of this kind per client and each of them is added with gen_event:add_sup_handler/3, which guarantees that if the client dies, the handler also dies.
 
 These two handlers are enough to do all the message routing. Additional handlers could be added to do logging, message history, presence updates, etc.
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.