mirror of
				https://github.com/django/daphne.git
				synced 2025-11-04 01:27:33 +03:00 
			
		
		
		
	add --ws-protocols to cli arguments
This commit is contained in:
		
							parent
							
								
									1d1b397aa2
								
							
						
					
					
						commit
						caee853da7
					
				| 
						 | 
				
			
			@ -70,6 +70,13 @@ class CommandLineInterface(object):
 | 
			
		|||
            'channel_layer',
 | 
			
		||||
            help='The ASGI channel layer instance to use as path.to.module:instance.path',
 | 
			
		||||
        )
 | 
			
		||||
        self.parser.add_argument(
 | 
			
		||||
            '--ws-protocol',
 | 
			
		||||
            nargs='*',
 | 
			
		||||
            dest='ws_protocols',
 | 
			
		||||
            help='The WebSocket protocols you wish to support',
 | 
			
		||||
            default=None,
 | 
			
		||||
        )
 | 
			
		||||
 | 
			
		||||
    @classmethod
 | 
			
		||||
    def entrypoint(cls):
 | 
			
		||||
| 
						 | 
				
			
			@ -123,4 +130,5 @@ class CommandLineInterface(object):
 | 
			
		|||
            http_timeout=args.http_timeout,
 | 
			
		||||
            ping_interval=args.ping_interval,
 | 
			
		||||
            action_logger=AccessLogGenerator(access_log_stream) if access_log_stream else None,
 | 
			
		||||
            ws_protocols=args.ws_protocols,
 | 
			
		||||
        ).run()
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue
	
	Block a user