-
Notifications
You must be signed in to change notification settings - Fork 3
Server
George Michaelides edited this page Mar 25, 2015
·
12 revisions
###Start a server
var server = new GemServer(ProfileName: "GemProfile"
ServerName: "GemServer",
Port: 14242,
MaxConnections: 10,
Password: "123456"
RequirePassword: true );
server.RunAsync();
###Register a command
GemServer
.RegisterCommand(command:"echo",
description:"Display Messages",
requiresAuthorization: false,
callback:(host, senderConnection, command,args)
=> host.SendToAll(args[0]));
###ExecuteCommand
GemServer.ExecuteCommand("echo i'm executing commands");
GemServer.ExecuteCommand(sender, "i'm remotely executing commands");