mirror of
				https://github.com/django/daphne.git
				synced 2025-11-04 01:27:33 +03:00 
			
		
		
		
	
		
			
				
	
	
		
			15 lines
		
	
	
		
			288 B
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			288 B
		
	
	
	
		
			Python
		
	
	
	
	
	
from channels.sessions import enforce_ordering
 | 
						|
 | 
						|
 | 
						|
#@enforce_ordering(slight=True)
 | 
						|
def ws_connect(message):
 | 
						|
    pass
 | 
						|
 | 
						|
 | 
						|
#@enforce_ordering(slight=True)
 | 
						|
def ws_message(message):
 | 
						|
    "Echoes messages back to the client"
 | 
						|
    message.reply_channel.send({
 | 
						|
        "text": message['text'],
 | 
						|
    })
 |