Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

IpDrv.MasterServerLink


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
class MasterServerLink extends Engine.Info
	native
	transient;

cpptext
{
	virtual UBOOL Poll( INT WaitTime ) { return 0; }
}

var native const int LinkPtr;
var globalconfig int LANPort;
var globalconfig int LANServerPort;
var globalconfig int CurrentMasterServer;
var globalconfig int MasterServerPort[5];
var globalconfig string MasterServerAddress[5];

native function bool Poll( int WaitTime );

event GetMasterServer( out string OutAddress, out int OutPort )
{
	if( CurrentMasterServer<0 || CurrentMasterServer>=5 || CurrentMasterServer>=5 || MasterServerAddress[CurrentMasterServer]=="" || MasterServerPort[CurrentMasterServer]==0 )
		CurrentMasterServer = 0;

	if( MasterServerAddress[0]=="" || MasterServerPort[0]==0 )
	{
		Log("Warning: No master servers found in the INI file");
        OutAddress = "ut2003master1.epicgames.com";
		OutPort = 28902;
	}
	else
	{
		OutAddress	= MasterServerAddress[CurrentMasterServer];
		OutPort		= MasterServerPort[CurrentMasterServer];
	}
}

simulated function Tick( float Delta )
{
	Poll(0);
}

defaultproperties
{
	bAlwaysTick=True
	LANPort=11777
	LANServerPort=10777
	CurrentMasterServer=0
	MasterServerPort(0)=28902
	MasterServerAddress(0)="ut2003master1.epicgames.com"
	MasterServerPort(1)=28902
	MasterServerAddress(1)="ut2003master1.epicgames.com"
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: ne 5.9.2004 16:02:16.000 - Creation time: st 23.5.2018 00:10:45.133 - Created with UnCodeX