mirror of
				https://github.com/ether/etherpad-lite.git
				synced 2025-11-04 02:01:30 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			33 lines
		
	
	
		
			647 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			647 B
		
	
	
	
		
			Markdown
		
	
	
	
	
	
# MessageHandler
 | 
						|
`require("./MessageHandler");`
 | 
						|
 | 
						|
The MessageHandler handles all Messages that comes from Socket.IO and controls the sessions
 | 
						|
 | 
						|
## Functions
 | 
						|
 | 
						|
- - -
 | 
						|
### handleConnect (client)
 | 
						|
Handles the connection of a new user
 | 
						|
 | 
						|
* **client** the new client
 | 
						|
 | 
						|
- - -
 | 
						|
### handleDisconnect (client)
 | 
						|
Handles the disconnection of a user
 | 
						|
 | 
						|
* **client** the client that leaves
 | 
						|
 | 
						|
- - -
 | 
						|
### handleMessage (client, message)
 | 
						|
Handles a message from a user
 | 
						|
 | 
						|
* **client** the client that send this message
 | 
						|
* **message** the message from the client
 | 
						|
 | 
						|
- - -
 | 
						|
### setSocketIO (socket_io)
 | 
						|
A associative array that translates a session to a pad
 | 
						|
 | 
						|
* **socket_io** The Socket
 | 
						|
 |