Indiefreaks.Xna.Sessions.Lidgren.LidgrenSession.LidgrenSession C# (CSharp) Method

LidgrenSession() private method

This constructor is used to create a temporary session exclusivly for the purpose of listening for Discovery messages
private LidgrenSession ( SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties ) : System
sessionType SessionType
maxGamers int
privateReservedSlots int
sessionProperties SessionProperties
return System
        internal LidgrenSession(SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties)
        {
            _isHost = false;
            _sessionType = sessionType;
            _sessionProperties = sessionProperties;

            if (maxGamers > MaximumSupportedGamersInSession)
                throw new CoreException("Cannot create sessions for more than " + MaximumSupportedGamersInSession + " players.");
            else
                _maxGamers = maxGamers;

            _privateReservedSlots = privateReservedSlots;

            LidgrenSessionManager.Client.Start();
            //LidgrenSessionManager.Client.Connect(serverHost, LidgrenSessionManager.ServerPort);
            _previousSecondBytesSent += LidgrenSessionManager.Client.Statistics.SentBytes;
            _previousSecondBytesReceived += LidgrenSessionManager.Client.Statistics.ReceivedBytes;

            _clientSessionState = SessionState.Lobby;
            _serverSessionState = SessionState.Lobby;
        }

Same methods

LidgrenSession::LidgrenSession ( string serverHost, SessionType sessionType, int maxGamers, int privateReservedSlots, SessionProperties sessionProperties, bool isHost ) : System