C# 클래스 BF2Statistics.Gamespy.MasterServer

Master.Gamespy.com Server. Alot of code was borrowed and re-written from the Open Source PRMasterServer located here: https://github.com/AncientMan2002/PRMasterServer
상속: GamespyUdpSocket
파일 보기 프로젝트 열기: BF2Statistics/ControlCenter 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
Servers GameServer>.ConcurrentDictionary

공개 메소드들

메소드 설명
MasterServer ( int &Port, LogWriter DebugLog ) : System
Shutdown ( ) : void

Shutsdown the Master server and socket

보호된 메소드들

메소드 설명
ProcessAccept ( GamespyUdpPacket Packet ) : void

Callback method for when the UDP Master socket recieves a connection

비공개 메소드들

메소드 설명
CheckServers ( ) : void

Executed every 5 seconds or so... Removes all servers that haven't reported in awhile, assuming they are offline

ParseServerDetails ( IPEndPoint remote, byte data ) : bool

Executed every 60 seconds per server (Every 3rd ping), the BF2 server sends a full list of data that describes its current state, and this method is used to parse that data, and update the server in the Servers list

ValidateServer ( IPEndPoint remote ) : bool

When a server sends data initially, it needs to be validated with a validation code. Once that has happened, this method is called, and it allows the server to be seen in the Serverlist. This method also corrects local IP addresses by converting them to External IP addresses, so that external clients get a good IP to connect to.

메소드 상세

MasterServer() 공개 메소드

public MasterServer ( int &Port, LogWriter DebugLog ) : System
Port int
DebugLog BF2Statistics.Logging.LogWriter
리턴 System

ProcessAccept() 보호된 메소드

Callback method for when the UDP Master socket recieves a connection
protected ProcessAccept ( GamespyUdpPacket Packet ) : void
Packet BF2Statistics.Gamespy.Net.GamespyUdpPacket
리턴 void

Shutdown() 공개 메소드

Shutsdown the Master server and socket
public Shutdown ( ) : void
리턴 void

프로퍼티 상세

Servers 공개적으로 정적으로 프로퍼티

A List of all servers that have sent data to this master server, and are active in the last 30 seconds or so
public static ConcurrentDictionary Servers
리턴 GameServer>.ConcurrentDictionary