Indiefreaks.Xna.Sessions.Lidgren.LidgrenSessionManager.FindSessionsWan C# (CSharp) Method

FindSessionsWan() public method

Sends a Find query on the network interface to look for AvailableSession instances asynchrnously
public FindSessionsWan ( SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host = null, int port = ServerPort ) : void
sessionType SessionType The SessionType we're looking for
maxLocalPlayers int The Maximum local players that can be added to the session used to filter sessions that have a limited number of opened public slots
sessionProperties SessionProperties The SessionProperties that will be used to filter query results. Can be null
host string The for WAN session discovery
port int The for WAN session discovery
return void
        public void FindSessionsWan(SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host = null, int port = ServerPort)
        {
            if (CurrentSession != null)
                throw new CoreException("Session is already running");

            _networkSessionLocker = FindingSessions;
            LidgrenSession.BeginFindWan(sessionType, maxLocalPlayers, sessionProperties, host, port, OnLidgrenSessionsFound, _networkSessionLocker);
        }