예제 #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));
        }
예제 #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));
        }
예제 #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);
        }
예제 #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);
        }