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

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

This method requests all of the hosts from the master server
public static GetHosts ( string host, ushort pageNumber, Action callback ) : void
host string The host of the master server
pageNumber ushort This is the page number (starting from 0). So if you want to get entries 0-n then you will pass 0, if you want n-n+n then pass 1
callback Action This is the method that will be called once the master server responds with the host list
Результат void
		public static void GetHosts(string host, ushort pageNumber, Action<HostInfo[]> callback)
		{
			requestHostsCallback = callback;

			Action<NetWorker> call = delegate(NetWorker socket)
			{
				BMSByte data = new BMSByte();
				ObjectMapper.MapBytes(data, pageNumber);
				Networking.WriteCustom(WriteCustomMapping.MASTER_SERVER_GET_HOSTS, socket, data, true, NetworkReceivers.Server);
			};

			Request(host, call);
		}