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

Method InitializeWebGL

sdks/csharp/src/WebSocket.cs:136–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

134 private TaskCompletionSource<int> _socketId;
135
136 private void InitializeWebGL()
137 {
138 Instance = this;
139 // Convert callbacks to function pointers
140 var openPtr = Marshal.GetFunctionPointerForDelegate((Action<int>)WebGLOnOpen);
141 var messagePtr = Marshal.GetFunctionPointerForDelegate((Action<int, IntPtr, int>)WebGLOnMessage);
142 var closePtr = Marshal.GetFunctionPointerForDelegate((Action<int, int, IntPtr>)WebGLOnClose);
143 var errorPtr = Marshal.GetFunctionPointerForDelegate((Action<int>)WebGLOnError);
144
145 WebSocket_Init(openPtr, messagePtr, closePtr, errorPtr);
146 }
147#endif
148
149 public async Task Connect(string? auth, string host, string nameOrAddress, ConnectionId connectionId, Compression compression, bool light, bool? confirmedReads)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected