Example #1
0
        internal static IAsyncResult BeginFindWan(SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host, int port, AsyncCallback callback, object asyncState)
        {
            if (sessionType == SessionType.SinglePlayer || sessionType == SessionType.SplitScreen)
            {
                throw new CoreException("Cannot look for SinglePlayer or SplitScreen sessions");
            }

            _localDiscoveryRequested = true;

            var asyncFind = new AsynchronousFind(Find);

            return(asyncFind.BeginInvoke(sessionType, maxLocalPlayers, sessionProperties, host, port, callback, asyncState));
        }
Example #2
0
        internal static IAsyncResult BeginFind(SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, AsyncCallback callback, object asyncState)
        {
            LidgrenSessionsFound.Clear();

            if (sessionType == SessionType.SinglePlayer || sessionType == SessionType.SplitScreen)
            {
                throw new CoreException("Cannot look for SinglePlayer or SplitScreen sessions");
            }

            _localDiscoveryRequested = true;

            var asyncFind = new AsynchronousFind(Find);

            return(asyncFind.BeginInvoke(sessionType, maxLocalPlayers, sessionProperties, null, LidgrenSessionManager.ServerPort, callback, asyncState));
        }
Example #3
0
        internal static IAsyncResult BeginFindWan(SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, string host, int port, AsyncCallback callback, object asyncState)
        {
            
            if (sessionType == SessionType.SinglePlayer || sessionType == SessionType.SplitScreen)
            {
                throw new CoreException("Cannot look for SinglePlayer or SplitScreen sessions");
            }

            _localDiscoveryRequested = true;

            var asyncFind = new AsynchronousFind(Find);
            return asyncFind.BeginInvoke(sessionType, maxLocalPlayers, sessionProperties, host, port, callback, asyncState);
        }
Example #4
0
        internal static IAsyncResult BeginFind(SessionType sessionType, int maxLocalPlayers, SessionProperties sessionProperties, AsyncCallback callback, object asyncState)
        {
            LidgrenSessionsFound.Clear();

            if (sessionType == SessionType.SinglePlayer || sessionType == SessionType.SplitScreen)
            {
                throw new CoreException("Cannot look for SinglePlayer or SplitScreen sessions");
            }

            _localDiscoveryRequested = true;

            var asyncFind = new AsynchronousFind(Find);
            return asyncFind.BeginInvoke(sessionType, maxLocalPlayers, sessionProperties, null, LidgrenSessionManager.ServerPort, callback, asyncState);
        }