BeardedManStudios.Network.ForgeMasterServer.RegisterServer C# (CSharp) Метод

RegisterServer() публичный статический Метод

This method is used to register a server to the master server to be retreived by clients
public static RegisterServer ( string host, ushort port, int maxPlayers, string name, string gameType = "", string comment = "", string password = "", string sceneName = "" ) : void
host string The master server host address
port ushort The port that this server will be running on
maxPlayers int The maximum amount of players allowed on this server
name string The name for this server
gameType string The type of game for this server (ie. deathmatch, capture the flag, etc.)
comment string The comment for this server (usually user populated for loading screens)
password string The password for this server
sceneName string The scene name that this server is currently on
Результат void
		public static void RegisterServer(string host, ushort port, int maxPlayers, string name, string gameType = "", string comment = "", string password = "", string sceneName = "")
		{
			Action<NetWorker> call = delegate(NetWorker socket)
			{
				BMSByte data = new BMSByte();
				ObjectMapper.MapBytes(data, port, maxPlayers, name, gameType, comment, password, sceneName);
				Networking.WriteCustom(WriteCustomMapping.MASTER_SERVER_REGISTER_SERVER, socket, data, true, NetworkReceivers.Server);
			};

			Request(host, call);
		}