We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Would be nice if there was a way to send and receive cross-server events.
Thinking of an API like this:
interface GlobalDefinition<F extends Callback> { Connect(callback: F): RBXScriptConnection; BroadcastAsync(...args: Parameters<F>): Promise<void>; UnicastAsync(jobId: string, ...args: Parameters<F>): Promise<void>; MulticastAsync(jobIds: ReadonlyArray<string>, ...args: Parameters<F>): Promise<void>; ClientBroadcastAsync(...args: Parameters<F>): Promise<void>; ClientUnicastAsync(userId: number, ...args: Parameters<F>): Promise<void>; ClientMulticastAsync(userIds: ReadonlyArray<number>, ...args: Parameters<F>): Promise<void>; }
Where you would declare it like:
new NetBuilder() .BindNamespace( "Announcement", new NetBuilder() .BindDefinition( new GlobalDefinitionBuilder("Shutdown").SetArguments(t.string).Broadcast().Build() ) .AsNamespace() ) .Build();
And would use it like:
Definitions.CrossServer.Shutdown.Connect((message) => { for (const player of Players.GetPlayers()) { player.Kick(message); } }); Definitions.CrossServer.Shutdown("hey");
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Would be nice if there was a way to send and receive cross-server events.
Thinking of an API like this:
Where you would declare it like:
And would use it like:
The text was updated successfully, but these errors were encountered: