MCPcopy Create free account
hub / github.com/clockworklabs/SpacetimeDB / OnConnected

Function OnConnected

templates/chat-console-cs/Program.cs:58–66  ·  view source on GitHub ↗
(DbConnection conn, Identity identity, string authToken)

Source from the content-addressed store, hash-verified

56
57/// Our `OnConnect` callback: save our credentials to a file.
58void OnConnected(DbConnection conn, Identity identity, string authToken)
59{
60 local_identity = identity;
61 AuthToken.SaveToken(authToken);
62
63 conn.SubscriptionBuilder()
64 .OnApplied(OnSubscriptionApplied)
65 .SubscribeToAllTables();
66}
67
68/// Our `OnConnectError` callback: print the error, then exit the process.
69void OnConnectError(Exception e)

Callers

nothing calls this directly

Calls 4

SaveTokenMethod · 0.45
SubscribeToAllTablesMethod · 0.45
OnAppliedMethod · 0.45
SubscriptionBuilderMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…