etherpad-lite/doc/jsdoc/MessageHandler.md

33 lines
647 B
Markdown
Raw Normal View History

2011-05-30 16:53:11 +02:00
# MessageHandler
2011-05-29 22:30:56 +02:00
`require("./MessageHandler");`
2011-05-30 16:53:11 +02:00
The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions
2011-05-29 22:30:56 +02:00
2011-05-30 16:53:11 +02:00
## Functions
2011-05-29 22:30:56 +02:00
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### handleConnect (client)
2011-05-29 22:30:56 +02:00
Handles the connection of a new user
* **client** the new client
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### handleDisconnect (client)
2011-05-29 22:30:56 +02:00
Handles the disconnection of a user
* **client** the client that leaves
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### handleMessage (client, message)
2011-05-29 22:30:56 +02:00
Handles a message from a user
* **client** the client that send this message
* **message** the message from the client
2011-05-30 17:05:42 +02:00
- - -
2011-05-30 16:53:11 +02:00
### setSocketIO (socket_io)
A associative array that translates a session to a pad
2011-05-29 22:30:56 +02:00
* **socket_io** The Socket