@@ -39,10 +39,7 @@ use http::Uri;
3939use spacetimedb_client_api_messages:: websocket:: { self as ws, common:: QuerySetId } ;
4040use spacetimedb_lib:: { bsatn, ser:: Serialize , ConnectionId , Identity , Timestamp } ;
4141use spacetimedb_sats:: Deserialize ;
42- use std:: {
43- collections:: HashMap ,
44- sync:: { atomic:: AtomicU32 , Arc , Mutex as StdMutex , OnceLock } ,
45- } ;
42+ use std:: sync:: { atomic:: AtomicU32 , Arc , Mutex as StdMutex , OnceLock } ;
4643#[ cfg( not( feature = "web" ) ) ]
4744use tokio:: {
4845 runtime:: { self , Runtime } ,
@@ -944,7 +941,7 @@ but you must call one of them, or else the connection will never progress.
944941 let connection_id_override = get_connection_id_override ( ) ;
945942 let ws_connection = WsConnection :: connect (
946943 self . uri . clone ( ) . unwrap ( ) ,
947- self . module_name . as_ref ( ) . unwrap ( ) ,
944+ self . database_name . as_ref ( ) . unwrap ( ) ,
948945 self . token . as_deref ( ) ,
949946 connection_id_override,
950947 self . params ,
@@ -972,7 +969,6 @@ but you must call one of them, or else the connection will never progress.
972969 ) )
973970 }
974971
975-
976972 /// Set the URI of the SpacetimeDB host which is running the remote database.
977973 ///
978974 /// The URI must have either no scheme or one of the schemes `http`, `https`, `ws` or `wss`.
@@ -1107,7 +1103,6 @@ fn build_db_ctx_inner<M: SpacetimeModule>(
11071103 on_connect : on_connect_cb,
11081104 on_connect_error : on_connect_error_cb,
11091105 on_disconnect : on_disconnect_cb,
1110- call_reducer_flags : <_ >:: default ( ) ,
11111106
11121107 procedure_callbacks : ProcedureCallbacks :: default ( ) ,
11131108 } ) )
@@ -1118,7 +1113,7 @@ fn build_db_ctx<M: SpacetimeModule>(
11181113 #[ cfg( not( feature = "web" ) ) ] runtime_handle : runtime:: Handle ,
11191114
11201115 inner_ctx : Arc < StdMutex < DbContextImplInner < M > > > ,
1121- raw_msg_send : mpsc:: UnboundedSender < ws:: ClientMessage < Bytes > > ,
1116+ raw_msg_send : mpsc:: UnboundedSender < ws:: v2 :: ClientMessage > ,
11221117 parsed_msg_recv : SharedAsyncCell < mpsc:: UnboundedReceiver < ParsedMessage < M > > > ,
11231118 pending_mutations_send : mpsc:: UnboundedSender < PendingMutation < M > > ,
11241119 pending_mutations_recv : SharedAsyncCell < mpsc:: UnboundedReceiver < PendingMutation < M > > > ,
@@ -1232,7 +1227,7 @@ fn spawn_parse_loop<M: SpacetimeModule>(
12321227
12331228#[ cfg( feature = "web" ) ]
12341229fn spawn_parse_loop < M : SpacetimeModule > (
1235- raw_message_recv : mpsc:: UnboundedReceiver < ws:: ServerMessage < BsatnFormat > > ,
1230+ raw_message_recv : mpsc:: UnboundedReceiver < ws:: v2 :: ServerMessage > ,
12361231) -> mpsc:: UnboundedReceiver < ParsedMessage < M > > {
12371232 let ( parsed_message_send, parsed_message_recv) = mpsc:: unbounded ( ) ;
12381233 wasm_bindgen_futures:: spawn_local ( parse_loop ( raw_message_recv, parsed_message_send) ) ;
0 commit comments