@@ -47,7 +47,7 @@ private struct DbEvent
4747 /// <summary>
4848 /// Called when a connection attempt fails.
4949 /// </summary>
50- public event Action < WebSocketError > onConnectError ;
50+ public event Action < WebSocketError ? > onConnectError ;
5151
5252 /// <summary>
5353 /// Called when a connection that was established has disconnected.
@@ -74,13 +74,10 @@ private struct DbEvent
7474 /// </summary>
7575 public event Action < ClientApi . Event > onEvent ;
7676
77- private WebSocketDispatch . WebSocket webSocket ;
77+ private SpacetimeDB . WebSocket webSocket ;
7878 private bool connectionClosed ;
7979 public static ClientCache clientDB ;
8080
81- private float ? lastClientTick ;
82- public static float clientTickInterval ;
83-
8481 private Thread messageProcessThread ;
8582
8683 public static NetworkManager instance ;
@@ -95,16 +92,17 @@ protected void Awake()
9592
9693 instance = this ;
9794
98- var options = new WebSocketDispatch . ConnectOptions
95+ var options = new SpacetimeDB . ConnectOptions
9996 {
10097 //v1.bin.spacetimedb
10198 //v1.text.spacetimedb
10299 Protocol = "v1.bin.spacetimedb" ,
103100 } ;
104- webSocket = new WebSocketDispatch . WebSocket ( options ) ;
101+ webSocket = new SpacetimeDB . WebSocket ( options ) ;
105102 webSocket . OnMessage += OnMessageReceived ;
106103 webSocket . OnClose += ( code , error ) => onDisconnect ? . Invoke ( code , error ) ;
107104 webSocket . OnConnect += ( ) => onConnect ? . Invoke ( ) ;
105+ webSocket . OnConnectError += a => onConnectError ? . Invoke ( a ) ;
108106
109107 clientDB = new ClientCache ( ) ;
110108
0 commit comments