Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
13 lines (10 sloc) 433 Bytes
from channels.routing import ChannelNameRouter, ProtocolTypeRouter, URLRouter
from channels.sessions import SessionMiddlewareStack
from django.conf.urls import url
from game.consumers import GameConsumer, PlayerConsumer
application = ProtocolTypeRouter(
{
"websocket": SessionMiddlewareStack(URLRouter([url(r"^ws/game/$", PlayerConsumer)])),
"channel": ChannelNameRouter({"game_engine": GameConsumer}),
}
)
You can’t perform that action at this time.