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

Function InputLoop

templates/chat-console-cs/Program.cs:214–234  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

212
213/// Read each line of standard input, and either set our name or send a message as appropriate.
214void InputLoop()
215{
216 while (true)
217 {
218 var input = Console.ReadLine();
219 if (input == null)
220 {
221 break;
222 }
223
224 if (input.StartsWith("/name "))
225 {
226 input_queue.Enqueue(("name", input[6..]));
227 continue;
228 }
229 else
230 {
231 input_queue.Enqueue(("message", input));
232 }
233 }
234}
235
236void ProcessCommands(RemoteReducers reducers)
237{

Callers 1

MainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…