mirror of
https://github.com/django/daphne.git
synced 2024-11-22 16:06:34 +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',
|
'channel_layer',
|
||||||
help='The ASGI channel layer instance to use as path.to.module:instance.path',
|
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
|
@classmethod
|
||||||
def entrypoint(cls):
|
def entrypoint(cls):
|
||||||
|
@ -123,4 +130,5 @@ class CommandLineInterface(object):
|
||||||
http_timeout=args.http_timeout,
|
http_timeout=args.http_timeout,
|
||||||
ping_interval=args.ping_interval,
|
ping_interval=args.ping_interval,
|
||||||
action_logger=AccessLogGenerator(access_log_stream) if access_log_stream else None,
|
action_logger=AccessLogGenerator(access_log_stream) if access_log_stream else None,
|
||||||
|
ws_protocols=args.ws_protocols,
|
||||||
).run()
|
).run()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user