You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea is to be able to drop in a text console "widget" into a webpage, e.g. a React control, or even in a static CDN website, that loads a console with a unique session ID, app ID and string[] channels. Then be able to treate writing to a remote console as simple as writing to a konsole window, with some extra support for broadcasting to channels, as well as processing user input.
for example, in a game; where the statusbar channel, is defined client side using normal console commands, window.SplitLeft(), splitColumns for example
// below code would be converted to javascript / react so shown only as pseduo code for converting to react.varrows=layout.SplitRows(newSplit(3,"headline",LineThickNess.Single,ConsoleColor.Yellow),newSplit(0,"content",LineThickNess.Single),newSplit(3,"status",LineThickNess.Single,ConsoleColor.Yellow));varrc=newremoteConsole(appId,appUrl,authtoken);varheader=newremoteConsole(rc,rows[0],"header");varcontent=newremoteConsole(rc,rows[1],"content");varstatus=newremoteConsole(rc,rows[2],"statusBar");rc.Render();rc.HandleEvents(myCancellationToken);
then server side you can write
var(deadUser,restOfUsers)=GetNextVictim();// returns sessionIDs used to communicate with remote users.varrc=newRemoteConsole(appId,appUrl,token);varcontentAll=rc.BroadCast.ToChannel("content").ToAllExcluding(deadUser.SessionId);contentAll.WriteLine(Yellow,$"{deadUser.Name} was killed by the wearwolf.");varcontentDead=rc.SingleCast(deadUser.SessionId).ToChannel("content"):
contentDead.WriteLine(Red,$"You have been killed by the wearwolf.");varstatusAll=rc.BroadCast.ToChannel("status");statusAll.WriteLine($"Only {cnt} players left alive!");
The text was updated successfully, but these errors were encountered:
SignalR/server send events React "Konsole"
The idea is to be able to drop in a text console "widget" into a webpage, e.g. a React control, or even in a static CDN website, that loads a console with a unique session ID, app ID and string[] channels. Then be able to treate writing to a remote console as simple as writing to a konsole window, with some extra support for broadcasting to channels, as well as processing user input.
for example, in a game; where the statusbar channel, is defined client side using normal console commands,
window.SplitLeft(), splitColumns
for examplethen server side you can write
The text was updated successfully, but these errors were encountered: