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

CreateWanSession() public method

Creates a wide area network session
it doesn't yet support multiple local players
public CreateWanSession ( int maxPlayers, SessionProperties sessionProperties ) : void
maxPlayers int The total maximum players for this session
sessionProperties SessionProperties The SessionProperties that will be used to find this session on the network. Can be null
return void
        public override void CreateWanSession(int maxPlayers, SessionProperties sessionProperties)
        {
            IPAddress ipAddress;
            var host = NetUtility.GetMyAddress(out ipAddress);

            _networkSessionLocker = CreatingSession;
            LidgrenSession.BeginCreate(host.ToString(), SessionType.WideAreaNetwork, 1, maxPlayers, 0, sessionProperties, OnLidgrenSessionCreated, _networkSessionLocker);
        }