1010from websockets import WebSocketCommonProtocol
1111
1212from idom .core .dispatcher import (
13- SingleStateDispatcher ,
14- SharedStateDispatcher ,
13+ SingleViewDispatcher ,
14+ SharedViewDispatcher ,
1515 SendCoroutine ,
1616 RecvCoroutine ,
1717)
@@ -139,7 +139,7 @@ def _run_application(
139139class PerClientStateServer (SanicRenderServer ):
140140 """Each client view will have its own state."""
141141
142- _dispatcher_type = SingleStateDispatcher
142+ _dispatcher_type = SingleViewDispatcher
143143
144144 async def _run_dispatcher (
145145 self ,
@@ -155,8 +155,8 @@ async def _run_dispatcher(
155155class SharedClientStateServer (SanicRenderServer ):
156156 """All connected client views will have shared state."""
157157
158- _dispatcher_type = SharedStateDispatcher
159- _dispatcher : SharedStateDispatcher
158+ _dispatcher_type = SharedViewDispatcher
159+ _dispatcher : SharedViewDispatcher
160160
161161 def _setup_application (self , app : Sanic , config : Config ) -> None :
162162 app .listener ("before_server_start" )(self ._activate_dispatcher )
@@ -166,7 +166,7 @@ def _setup_application(self, app: Sanic, config: Config) -> None:
166166 async def _activate_dispatcher (
167167 self , app : Sanic , loop : asyncio .AbstractEventLoop
168168 ) -> None :
169- self ._dispatcher = cast (SharedStateDispatcher , self ._make_dispatcher ({}, loop ))
169+ self ._dispatcher = cast (SharedViewDispatcher , self ._make_dispatcher ({}, loop ))
170170 await self ._dispatcher .__aenter__ ()
171171
172172 async def _deactivate_dispatcher (
0 commit comments