17 #include <pia/session/session_definitions.h> 19 #include <pia/common/common_CryptoSetting.h> 21 #include <pia/transport.h> 23 #include <pia/session/session_Mesh.h> 34 typedef CallContext AsyncContext;
46 class StationConnectionInfo;
59 class CreateSessionSetting;
60 class JoinSessionSetting;
61 class SessionStatusCheckJob;
62 class CreateSessionJob;
63 class AutoMatchmakeJob;
64 class BrowseMatchmakeJob;
66 class DestroySessionJob;
67 class LeaveSessionJob;
68 class OpenParticipationJob;
70 class CloseParticipationJob;
72 class ConfigParticipationJobBase;
73 class GenerateMatchmakeSystemPasswordJob;
74 class ClearMatchmakeSystemPasswordJob;
75 class JointSessionJob;
76 class ModifyAttributeJob;
77 class UpdateSessionSettingJob;
78 class UpdateApplicationDataJob;
80 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 81 class RefereeStartGameJob;
82 class RefereeEndGameJob;
83 class RefereeEndGameWithoutReportJob;
84 class RefereeGetOrCreateStatsJob;
85 class IMatchmakeReferee;
86 class IEndGamePersonalReport;
89 class StationIdStatusTable;
90 class SessionProtocol;
91 class IMatchmakeSession;
92 class ISessionInfoList;
93 class MeshLayerController;
94 class MatchNetworkFactory;
95 class SessionSearchCriteria;
97 class ISessionInfoList;
98 class MeshEventListenerForSession;
99 class UpdateSessionSetting;
130 friend class SessionStatusCheckJob;
131 friend class CreateSessionJob;
132 friend class AutoMatchmakeJob;
133 friend class JoinSessionJob;
134 friend class JointSessionJob;
135 friend class DestroySessionJob;
136 friend class LeaveSessionJob;
137 friend class OpenParticipationJob;
138 friend class OpenSessionJob;
139 friend class CloseParticipationJob;
140 friend class CloseSessionJob;
141 friend class SessionProtocol;
142 friend class StationIdStatusTable;
143 friend class MeshEventListenerForSession;
144 friend class MeshLayerController;
145 friend class UpdateApplicationDataJob;
146 friend class ModifyAttributeJob;
147 friend class GenerateMatchmakeSystemPasswordJob;
148 friend class ClearMatchmakeSystemPasswordJob;
158 : pNetworkFactory(NULL),
160 browsedSessionInfoListNum(0)
161 #if NN_PIA_EXPERIMENT_BAND_WIDTH_CHECK 170 #if NN_PIA_EXPERIMENT_BAND_WIDTH_CHECK 180 DebugSetting(
bool argIsEnableRelayEmulation =
false,
bool argIsEnableMatchmakeAnalysis =
false,
bool argIsDisableCheckMaxSilenceTime =
false)
181 : isEnableRelayEmulation(argIsEnableRelayEmulation),
182 isEnableMatchmakeAnalysis(argIsEnableMatchmakeAnalysis),
183 isDisableCheckMaxSilenceTime(argIsDisableCheckMaxSilenceTime)
197 : bUsingHostMigration(
true),
202 #if NN_PIA_EXPERIMENT_BAND_WIDTH_CHECK 204 bitRateCheckPacketSize(0),
205 bitRateMeasuringSpan(1000),
206 isSkipBitRateCheck(
false),
216 #if NN_PIA_EXPERIMENT_BAND_WIDTH_CHECK 246 ESTABLISHED_JOINT_SESSION
254 enum ConnectionStatus
258 DISCONNECTED_SESSION,
268 PROCESS_TYPE_NONE = 0,
269 PROCESS_TYPE_MERGE_SESSION,
270 PROCESS_TYPE_MERGE_RANDOM_SESSION,
271 PROCESS_TYPE_DEMERGE_SESSION,
272 PROCESS_TYPE_EMIGRATE_SESSION,
273 PROCESS_TYPE_EMIGRATE_RANDOM_SESSION,
274 PROCESS_TYPE_CREATE_JOINT_SESSION,
275 PROCESS_TYPE_JOIN_JOINT_SESSION,
276 PROCESS_TYPE_JOIN_RANDOM_JOINT_SESSION,
277 PROCESS_TYPE_DESTROY_JOINT_SESSION,
278 PROCESS_TYPE_LEAVE_JOINT_SESSION,
287 enum LeaveMeshProcessType {
288 LEAVE_PROCESS_TYPE_UNKNOWN = 0,
289 LEAVE_PROCESS_TYPE_LEAVE,
290 LEAVE_PROCESS_TYPE_LEAVE_WITH_HM,
291 LEAVE_PROCESS_TYPE_DESTROY
311 MIGRATION_FATAL_ERROR
326 STATUS_DISCONNECTED_NETWORK
341 EVENT_START_SESSION_CREATE_JOINT = 11,
353 EVENT_CLEAR_SESSION_SYSTEM_PASSWORD
381 typedef common::ObjList<StationId> TStationIdList;
399 return &(*m_Iterator);
403 return m_Iterator == rhs.m_Iterator;
407 return !(*
this == rhs);
415 TStationIdList::Iterator m_Iterator;
425 : m_ConstIterator(it)
430 return *m_ConstIterator;
434 return &(*m_ConstIterator);
438 return m_ConstIterator == rhs.m_ConstIterator;
442 return !(*
this == rhs);
451 TStationIdList::ConstIterator m_ConstIterator;
483 static void DestroyInstance();
517 static nn::Result SetDebugSetting(
const DebugSetting& debugSetting);
716 bool IsCompletedJoinRandomSession()
const;
754 nn::Result GetJoinRandomSessionResult()
const;
769 nn::Result CancelJoinRandomSessionAsync();
800 bool IsCompletedBrowseSession()
const;
820 nn::Result GetBrowseSessionResult()
const;
861 bool IsCompletedCreateSession()
const;
884 nn::Result GetCreateSessionResult()
const;
916 bool IsCompletedJoinSession()
const;
969 nn::Result GetJoinSessionResult()
const;
984 nn::Result CancelJoinSessionAsync();
1001 nn::Result LeaveSessionAsync();
1011 bool IsCompletedLeaveSession()
const;
1028 nn::Result GetLeaveSessionResult()
const;
1047 nn::Result OpenParticipationAsync();
1057 bool IsCompletedOpenParticipation()
const;
1074 nn::Result GetOpenParticipationResult()
const;
1096 nn::Result OpenSessionAsync();
1106 bool IsCompletedOpenSession()
const;
1124 nn::Result GetOpenSessionResult()
const;
1150 nn::Result CloseParticipationAsync();
1160 bool IsCompletedCloseParticipation()
const;
1178 nn::Result GetCloseParticipationResult()
const;
1201 nn::Result CloseSessionAsync();
1211 bool IsCompletedCloseSession()
const;
1229 nn::Result GetCloseSessionResult()
const;
1253 nn::Result GenerateSystemPasswordAsync(
wchar_t* pSystemPassword);
1263 bool IsCompletedGenerateSystemPassword()
const;
1281 nn::Result GetGenerateSystemPasswordResult()
const;
1284 void SetSessionSystemPassword(
const wchar_t* pSystemPassword,
size_t length);
1285 void ResetSessionSystemPassword();
1300 void GetSessionSystemPassword(
wchar_t* pSystemPassword);
1321 nn::Result ClearSystemPasswordAsync();
1331 bool IsCompletedClearSystemPassword()
const;
1348 nn::Result GetClearSystemPasswordResult()
const;
1369 nn::Result ModifyAttributeAsync(u32 attributeIndex, u32 newValue);
1379 bool IsCompletedModifyAttribute()
const;
1396 nn::Result GetModifyAttributeResult()
const;
1426 bool IsCompletedUpdateSessionSetting()
const;
1442 nn::Result GetUpdateSessionSettingResult()
const;
1464 nn::Result UpdateApplicationDataAsync(
const void* pApplicationData,
size_t dataSize);
1473 bool IsCompletedUpdateApplicationData()
const;
1490 nn::Result GetUpdateApplicationDataResult()
const;
1513 nn::Result UpdateSelectionPriority(u8 priority)
const;
1519 bool IsUpdatableSelectionPriority(u8 priority)
const;
1522 MeshLayerController* GetMeshLayerControllerPtr()
1524 return m_pMeshLayerController;
1546 bool IsHost()
const;
1556 bool IsMeshHost()
const;
1565 bool IsOwner()
const;
1612 return m_LocalStationId;
1625 return m_HostStationId;
1663 u16 GetStationNum()
const;
1674 u16 GetMatchmakeSessionParticipantNum()
const;
1683 u16 GetValidStationIdNum()
const;
1700 nn::Result CheckConnectionError()
const;
1711 Status GetStatus()
const;
1718 bool IsCompleteBitRateCheck();
1737 nn::Result GetUplinkBitRate(s32* pBps);
1745 MatchmakeStatus GetMatchmakeStatus()
const 1747 return m_MatchmakeStatus;
1757 ConnectionStatus GetConnectionStatus()
const 1759 return m_ConnectionStatus;
1765 StationIdStatusTable* GetStationIdStatusTablePtr()
1767 return m_pStationIdStatusTable;
1771 SessionProtocol* GetSessionProtocolPtr()
1773 return m_pSessionProtocol;
1784 return GetCurrentSessionId();
1800 void SetSessionId(u32 sessionId)
1802 SetCurrentSessionId(sessionId);
1805 void SetPrincipalId(u32 principalId)
1807 m_PrincipalId = principalId;
1809 u32 GetPrincipalId()
const 1811 return m_PrincipalId;
1861 bool IsUsingStationIdTable()
const;
1898 nn::Result JoinRandomJointSessionAsync(
1901 size_t criteriaNum);
1912 bool IsCompletedJoinRandomJointSession()
const;
1958 nn::Result GetJoinRandomJointSessionResult()
const;
1994 bool IsCompletedCreateJointSession()
const;
2017 nn::Result GetCreateJointSessionResult()
const;
2052 bool IsCompletedJoinJointSession()
const;
2098 nn::Result GetJoinJointSessionResult()
const;
2121 nn::Result LeaveJointSessionAsync();
2132 bool IsCompletedLeaveJointSession()
const;
2154 nn::Result GetLeaveJointSessionResult()
const;
2178 nn::Result DestroyJointSessionAsync();
2189 bool IsCompletedDestroyJointSession()
const;
2211 nn::Result GetDestroyJointSessionResult()
const;
2229 nn::Result OpenJointSessionParticipationAsync();
2240 bool IsCompletedOpenJointSessionParticipation()
const;
2258 nn::Result GetOpenJointSessionParticipationResult()
const;
2279 nn::Result OpenJointSessionAsync();
2289 bool IsCompletedOpenJointSession()
const;
2307 nn::Result GetOpenJointSessionResult()
const;
2332 nn::Result CloseJointSessionParticipationAsync();
2343 bool IsCompletedCloseJointSessionParticipation()
const;
2362 nn::Result GetCloseJointSessionParticipationResult()
const;
2384 nn::Result CloseJointSessionAsync();
2394 bool IsCompletedCloseJointSession()
const;
2412 nn::Result GetCloseJointSessionResult()
const;
2433 nn::Result ModifyJointSessionAttributeAsync(u32 attributeIndex, u32 newValue);
2443 bool IsCompletedModifyJointSessionAttribute()
const;
2460 nn::Result GetModifyJointSessionAttributeResult()
const;
2491 bool IsCompletedUpdateJointSessionSetting()
const;
2507 nn::Result GetUpdateJointSessionSettingResult()
const;
2529 nn::Result UpdateJointSessionApplicationDataAsync(
const void* pApplicationBuffer,
size_t dataSize);
2539 bool IsCompletedUpdateJointSessionApplicationData()
const;
2557 nn::Result GetUpdateJointSessionApplicationDataResult()
const;
2568 u32 GetJointSessionId()
const;
2577 bool IsJointSessionHost()
const;
2599 StationId GetJointSessionHostStationId()
const;
2618 int GetJointSequence();
2624 int GetJoinSequence();
2625 int GetJoinAutoMatchmakeSequence();
2626 int GetJoinMeshSequence();
2627 u8 GetCloseSessionSequence();
2628 u8 GetCloseJointSessionSequence();
2629 u8 GetOpenSessionSequence();
2630 u8 GetOpenJointSessionSequence();
2631 void CleanupJobsWhenJointSession();
2658 nn::Result RegisterSessionEventCallback(SessionEventCallback callback);
2665 void UnregisterSessionEventCallback();
2671 void CheckStatusAtChangeMeshState();
2685 void RegisterJoiningApprovalCallback(JoiningApprovalCallback callback);
2692 void UnregisterJoiningApprovalCallback();
2696 MeshEventListener* GetMeshEventListenerPtr();
2697 transport::Transport::DisconnectionEventListener GetDisconnectionEventListener();
2698 static u8 CheckHostCandidateRankingCallback(
StationIndex targetStationIndex,
bool isHost);
2699 static u32 GetSessionIdCallback();
2709 void JoinNotice(
StationId targetStationId);
2734 s64 GetTime(
void)
const;
2743 void SetSyncClockPulseInterval(s32 interval);
2752 s32 GetSyncClockPulseInterval(
void)
const;
2779 nn::Result SetMaxNumOfRelayRoutesAssignedToStation(u16 num);
2797 nn::Result SetMaxRtt(u16 rtt);
2863 void ResetRelayEmulation();
2870 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 2871 nn::Result GetRefereeStatsAsync(u32 initialRatingValue, u32 category);
2872 bool IsCompletedGetRefereeStats();
2873 nn::Result GetGetRefereeStatsResult();
2875 nn::Result StartGameAsync(u32 category);
2876 bool IsCompletedStartGame();
2877 nn::Result GetStartGameResult();
2879 nn::Result EndGameAsync(session::IEndGamePersonalReport* pReportArray,
size_t reportArraySize);
2880 bool IsCompletedEndGame();
2881 nn::Result GetEndGameResult();
2883 nn::Result EndGameWithoutReportAsync();
2884 bool IsCompletedEndWithoutReportGame();
2885 nn::Result GetEndGameWithoutReportResult();
2905 return m_IsUsingHostMigration;
2966 virtual void Trace(u64 flag)
const;
2982 bool SaveWaitingStationIndex();
2983 u32 UpdateWaitingStationIndexNum();
2984 void SetWaitingOtherClientsFlag(
bool flag);
2988 IMatchmakeSession* GetCurrentMatchmakeSession()
2990 return m_pMatchmakeSessionPtrArray[currentIndex()];
2992 IMatchmakeSession* GetBufferMatchmakeSession()
2994 return m_pMatchmakeSessionPtrArray[bufferIndex()];
2996 const IMatchmakeSession* GetCurrentMatchmakeSession()
const 2998 return m_pMatchmakeSessionPtrArray[currentIndex()];
3000 const IMatchmakeSession* GetBufferMatchmakeSession()
const 3002 return m_pMatchmakeSessionPtrArray[bufferIndex()];
3006 return m_pSessionInfoList;
3008 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 3009 IMatchmakeReferee* GetMatchmakeReferee()
3011 return m_pMatchmakeRefereePtr;
3015 u32 GetCurrentSessionId()
const 3017 return m_SessionId[currentIndex()];
3019 u32 GetBufferSessionId()
const 3021 return m_SessionId[bufferIndex()];
3023 u8 GetCurrentMaxParticipantNum()
const 3025 return m_MaxParticipantNum[currentIndex()];
3027 u8 GetBufferMaxParticipantNum()
const 3029 return m_MaxParticipantNum[bufferIndex()];
3032 bool IsLeaveIgnorable()
3034 return m_LeaveIgnorableFlag;
3036 bool IsPostponeJoinEvent()
3038 return m_PostponeJoinEventFlag;
3041 void IsHostMigrateOccurred(
bool b);
3042 bool IsHostMigrateOccurred();
3044 void NotifyOwnershipChange(u32 sessionId, u32 ownerId);
3045 void NotifyUpdateHost(u32 sessionId, u32 hostId);
3046 void NotifyLeave(u32 sessionId, u32 principalId);
3047 void NotifyUnregister(u32 sessionId);
3048 void SetUsingLastGidOption(
bool b);
3052 bool IsTargetMatchmakeSessionOpen()
const;
3053 bool IsOpenSession(u32 sessionId = 0)
const;
3054 void SetOpenSession(u32 sessionId,
bool flg);
3055 u32 GetConfigParticipationTargetSessionId()
const;
3056 IMatchmakeSession* GetConfigParticipationTargetMatchmakeSession();
3057 const IMatchmakeSession* GetConfigParticipationTargetMatchmakeSession()
const;
3058 ModuleState GetModuleState()
const 3060 return m_ModuleState;
3065 bool IsProcessingJoin()
const;
3066 bool IsWaitingOtherClients()
const;
3067 bool IsPostponeNotice()
const;
3094 bool UpdateStationIdToBecomeHost();
3095 bool UpdateStationIdToBecomeClient();
3100 bool SendMatchStationInfoToOtherClient();
3102 void CleanupStatus(
bool isPostponeCleanupLocalStationId =
false);
3104 void ChangeStatusToDisconnectedSession();
3105 void ChangeStatusToDisconnectedNetwork();
3107 void CancelJoinProcessByFatalError();
3114 bool m_IsUsingHostMigration;
3117 bool m_IsNecessaryServer;
3119 MeshLayerController* m_pMeshLayerController;
3121 SessionStatusCheckJob* m_pSessionStatusCheckJob;
3122 CreateSessionJob* m_pCreateSessionJob;
3123 AutoMatchmakeJob* m_pAutoMatchmakeJob;
3124 BrowseMatchmakeJob* m_pBrowseMatchmakeJob;
3125 JoinSessionJob* m_pJoinSessionJob;
3126 LeaveSessionJob* m_pLeaveSessionJob;
3127 DestroySessionJob* m_pDestroySessionJob;
3128 OpenParticipationJob* m_pOpenParticipationJob;
3130 CloseParticipationJob* m_pCloseParticipationJob;
3132 ConfigParticipationJobBase* m_pConfigParticipationJob;
3134 GenerateMatchmakeSystemPasswordJob* m_pGenerateMatchmakeSystemPasswordJob;
3135 ClearMatchmakeSystemPasswordJob* m_pClearMatchmakeSystemPasswordJob;
3137 u32 m_SessionPasswordSize;
3138 wchar_t* m_pSessionPassword;
3140 JointSessionJob* m_pJointSessionJob;
3142 ModifyAttributeJob* m_pModifyAttributeJob;
3143 UpdateSessionSettingJob* m_pUpdateSessionSettingJob;
3144 UpdateApplicationDataJob* m_pUpdateApplicationDataJob;
3146 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 3147 RefereeStartGameJob* m_pRefereeStartGameJob;
3148 RefereeEndGameJob* m_pRefereeEndGameJob;
3149 RefereeEndGameWithoutReportJob* m_pRefereeEndGameWithoutReportJob;
3150 RefereeGetOrCreateStatsJob* m_pRefereeGetOrCreateStatsJob;
3156 SessionEventCallback m_SessionEventCallback;
3157 JoiningApprovalCallback m_JoiningApprovalCallback;
3159 StationIdStatusTable* m_pStationIdStatusTable;
3161 u32 m_SessionProtocolHandle;
3162 SessionProtocol* m_pSessionProtocol;
3164 ModuleState m_ModuleState;
3165 MatchmakeStatus m_MatchmakeStatus;
3167 ConnectionStatus m_ConnectionStatus;
3175 enum AsyncProcessingName
3178 ASYNC_AUTO_MATCHMAKE,
3179 ASYNC_BROWSE_SESSION,
3180 ASYNC_CREATE_SESSION,
3182 ASYNC_LEAVE_SESSION,
3183 ASYNC_OPEN_PARTICIPATION,
3185 ASYNC_CLOSE_PARTICIPATION,
3186 ASYNC_CLOSE_SESSION,
3187 ASYNC_GENERATE_MATCHMAKE_SYSTEM_PASSWORD,
3188 ASYNC_CLEAR_MATCHMAKE_SYSTEM_PASSWORD,
3189 ASYNC_AUTO_MATCHMAKE_GAME,
3190 ASYNC_BROWSE_GAME_SESSION,
3191 ASYNC_CREATE_GAME_SESSION,
3192 ASYNC_JOIN_GAME_SESSION,
3193 ASYNC_LEAVE_GAME_SESSION,
3194 ASYNC_OPEN_GAME_SESSION_PARTICIPATION,
3195 ASYNC_CLOSE_GAME_SESSION_PARTICIPATION,
3196 ASYNC_MERGE_SESSION,
3197 ASYNC_MERGE_RANDOM_SESSION,
3198 ASYNC_DEMERGE_SESSION,
3199 ASYNC_CREATE_JOINT_SESSION,
3200 ASYNC_JOIN_JOINT_SESSION,
3201 ASYNC_JOIN_RANDOM_JOINT_SESSION,
3202 ASYNC_DESTROY_JOINT_SESSION,
3203 ASYNC_LEAVE_JOINT_SESSION,
3204 ASYNC_OPEN_JOINT_SESSION_PARTICIPATION,
3205 ASYNC_CLOSE_JOINT_SESSION_PARTICIPATION,
3206 ASYNC_OPEN_JOINT_SESSION,
3207 ASYNC_CLOSE_JOINT_SESSION,
3208 ASYNC_UPDATE_SESSION_SETTING,
3209 ASYNC_UPDATE_JOINT_SESSION_SETTING,
3210 ASYNC_UPDATE_APPLICATION_DATA,
3211 ASYNC_UPDATE_JOINT_SESSION_APPLICATION_DATA,
3212 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 3215 ASYNC_END_GAME_WITHOUT_REPORT,
3216 ASYNC_GET_OR_CREATE_REFEREE_STATS,
3218 ASYNC_MODIFY_MATCHMAKE_SESSION_ATTRIBUTE,
3219 ASYNC_MODIFY_JOINT_SESSION_ATTRIBUTE
3222 void ResetInternalAsyncState();
3223 bool IsCompletedAsyncProcess(AsyncProcessingName processingName)
const;
3224 nn::Result GetAsyncProcessResult(AsyncProcessingName processingName)
const;
3225 nn::Result CancelAsyncProcess(AsyncProcessingName processingName);
3227 nn::Result OpenParticipationCore(u32 sessionId, IMatchmakeSession* pMatchmakeSession, AsyncProcessingName asyncProcessName);
3228 nn::Result OpenSessionCore(u32 sessionId, IMatchmakeSession* pMatchmakeSession, AsyncProcessingName asyncProcessName);
3229 nn::Result CloseParticipationCore(u32 sessionId, IMatchmakeSession* pMatchmakeSession, AsyncProcessingName asyncProcessName);
3230 nn::Result CloseSessionCore(u32 sessionId, IMatchmakeSession* pMatchmakeSession, AsyncProcessingName asyncProcessName);
3232 nn::Result ModifyAttributeAsyncCore(u32 attributeIndex, u32 newValue, u32 targetSessionId, nn::pia::session::IMatchmakeSession* ptargetMatchmakeSession);
3233 nn::Result UpdateSessionSettingAsyncCore(
UpdateSessionSetting* pUpdateSessionSetting, u32 targetSessionId);
3234 nn::Result UpdateApplicationDataAsyncCore(
const void* pApplicationBuffer,
size_t dataSize, u32 targetSessionId);
3237 AsyncProcessingName m_CurrentAsyncProcessingName;
3239 MeshEventListenerForSession* m_pMeshEventListenerForSession;
3243 bit32 m_WaitingStationIndexBitmap;
3244 bool m_WaitingOtherClientsStationIdFlag;
3245 bool LeaveNoticeToWaitingStationIndex(
StationIndex leaveStationIndex);
3246 void ClearWaitingStationIndex();
3248 bool m_LeaveIgnorableFlag;
3249 bool m_PostponeJoinEventFlag;
3250 void SetLeaveIgnorableFlag(
bool isLeaveIgnorable)
3252 m_LeaveIgnorableFlag = isLeaveIgnorable;
3254 void SetPostponeJoinEvent(
bool isPostponeJoinEvent)
3256 m_PostponeJoinEventFlag = isPostponeJoinEvent;
3259 u8 currentIndex()
const 3261 return m_CurrentMatchmakeSessionIndex;
3263 u8 bufferIndex()
const 3265 return (m_CurrentMatchmakeSessionIndex == 0 ? 1 : 0);
3267 void SetCurrentSessionId(u32 sessionId)
3269 m_SessionId[currentIndex()] = sessionId;
3271 void SetBufferSessionId(u32 sessionId)
3273 m_SessionId[bufferIndex()] = sessionId;
3275 void SetCurrentMaxParticipantNum(u8 num)
3277 m_MaxParticipantNum[currentIndex()] = num;
3279 void SetBufferMaxParticipantNum(u8 num)
3281 m_MaxParticipantNum[bufferIndex()] = num;
3283 void SwapMatchmakeSessionBuffer()
3285 m_CurrentMatchmakeSessionIndex = bufferIndex();
3288 u8 m_MaxParticipantNum[2];
3289 u8 m_CurrentMatchmakeSessionIndex;
3290 IMatchmakeSession* m_pMatchmakeSessionPtrArray[2];
3293 #if NN_PIA_ENABLE_MATCHMAKE_REFEREE 3294 IMatchmakeReferee* m_pMatchmakeRefereePtr;
3296 void ChangeStationIdConvertEnableFlag(
bool flag);
3298 TStationIdList m_ValidStationIdList;
3299 void* m_pValidStationIdListBuffer;
3300 void validateStationId(
const StationId& targetStationId);
3301 void invalidateStationId(
const StationId& targetStationId);
3303 u32 m_SessionIdOfJointSessionHost;
3307 bool m_IsHostMigrateOccurred;
3310 static const int CLOSE_SESSION_LIST_NUM = 4;
3311 u32 m_CloseSessionId[CLOSE_SESSION_LIST_NUM];
3313 bool m_IsUsingLastGidOption;
Specifies that the disconnection from the session was caused by the library. One way to get this valu...
Definition: session_Session.h:307
Indicates that host migration failed. (Only occurs when host migration is enabled.)
Definition: session_Session.h:339
Indicates that the process of disbanding a joint session has started. (Only occurs when using the joi...
Definition: session_Session.h:347
Indicates that the process of creating a joint session has finished. (Only occurs when using the join...
Definition: session_Session.h:342
Status
Enumerates session states.
Definition: session_Session.h:319
Indicates that the process of leaving a joint session has started. (Only occurs when using the joint ...
Definition: session_Session.h:349
s32 uplinkBitRateLowerLimit
Specifies the minimum rate required by the application when using the bitrate detection feature...
Definition: session_Session.h:217
Stores parameters passed to the nn::pia::session::Session::CreateInstance() function.
Definition: session_Session.h:155
EmulationType
Enumerates connection path emulation settings. (For debugging.)
Definition: session_Mesh.h:308
bool isEnableRelayEmulation
Settings for the connection route emulation feature for debugging.
Definition: session_Session.h:186
const nn::pia::transport::Station::IdentificationToken * pToken
Specifies a pointer to the identification token indicating the local device. If NULL is specified...
Definition: session_Session.h:222
StationIdIterator Begin()
Gets an iterator for the valid StationId objects in the session (non-const version).
Definition: session_Session.h:1821
const nn::pia::transport::Station::PlayerName * pPlayerName
Specifies the name and language code associated with the local station. Other members of the mesh acc...
Definition: session_Session.h:212
This class contains processes for matchmaking and for creating and joining sessions used for P2P comm...
Definition: session_Session.h:128
Specifies that no communication has been performed. You get this value if you never build or join a s...
Definition: session_Session.h:303
Joined a session.
Definition: session_Session.h:322
StationIndex
Enumerates StationIndex values.
Definition: platformCtr.h:44
Definition of the StationId identifying the station within the session.
Definition: types.h:33
Indicates that the host of the joint session has changed. (Only occurs when using the joint session f...
Definition: session_Session.h:340
bool isDisableCheckMaxSilenceTime
Does not check the range set for the maximum time without communication.
Definition: session_Session.h:188
(For debugging.) This structure stores the debug feature settings that are passed to nn::pia::session...
Definition: session_Session.h:178
u32 maxSilenceTime
Specifies the maximum allowable time without communication (in milliseconds). The default value is se...
Definition: session_Session.h:214
A system password was set on the session.
Definition: session_Session.h:352
The base class for the search criteria used when searching for sessions.
Definition: session_SessionSearchCriteria.h:34
StationId GetHostStationId() const
Gets the StationId that represents the host of the session where the local station is a participant...
Definition: session_Session.h:1623
StationIdConstIterator End() const
Gets an iterator for the valid StationId objects in the session (non-const version).
Definition: session_Session.h:1854
u8 browsedSessionInfoListNum
Size of the list that stores the session search results.
Definition: session_Session.h:169
Not communicating.
Definition: session_Session.h:321
DisconnectReason
Enumerates reasons why a Session object cannot communicate.
Definition: session_Session.h:300
bool bUsingHostMigration
Sets the use of the host migration feature. The default is true (enabled).
Definition: session_Session.h:211
Specifies that the disconnection was caused by a desync. (The session information was no longer consi...
Definition: session_Session.h:308
Base class that manages settings specific to session creation.
Definition: session_CreateSessionSetting.h:38
Indicates that a joint session has started through random matchmaking. (Only occurs when using the jo...
Definition: session_Session.h:345
Full-Mesh Network Topology.
Definition: session_types.h:45
Indicates that the process of joining a joint session has finished. (Only occurs when using the joint...
Definition: session_Session.h:344
Do not measure the bitrate.
Definition: session_types.h:58
Indicates that the session migration process for the joint session feature failed. (Only occurs when using the joint session feature.)
Definition: session_Session.h:351
Indicates that the process of leaving a joint session has finished. (Only occurs when using the joint...
Definition: session_Session.h:350
Stores the player name struct associated with a Station.
Definition: transport_Station.h:692
StationIdIterator End()
Gets an iterator for the valid StationId objects in the session (non-const version).
Definition: session_Session.h:1832
Indicates that the process of disbanding a joint session has finished. (Only occurs when using the jo...
Definition: session_Session.h:348
NetworkTopology
Enumerated type for configuring the network topology of a mesh created with the Session class or the ...
Definition: session_types.h:43
StationId GetLocalStationId() const
Gets the StationId that represents the local station in the session.
Definition: session_Session.h:1610
Represents the calling context.
Definition: common_CallContext.h:43
A station has left.
Definition: session_Session.h:337
static const s32 NN_PIA_SESSION_KEEP_ALIVE_INTERVAL_DEFAULT
The default value for the sending interval (in milliseconds) for keep-alive.
Definition: session_types.h:29
This structure stores settings passed to nn::pia::session::Session::Startup.
Definition: session_Session.h:194
Base class that manages settings specific to session criteria updates.
Definition: session_UpdateSessionSetting.h:30
Specifies that the disconnection was caused by something other than the session. One way to get this ...
Definition: session_Session.h:310
static const s32 NN_PIA_SESSION_MAX_SILENCE_TIME_DEFAULT
The default value for the amount of time without communication (in milliseconds) after which it is de...
Definition: session_types.h:30
transport::NetworkFactory * pNetworkFactory
Pointer to a NetworkFactory specified for each network.
Definition: session_Session.h:167
None.
Definition: common_CryptoSetting.h:49
SessionEventType
This enumerated type is passed as a parameter to the callback that sends notifications about changes ...
Definition: session_Session.h:334
Joined a joint session.
Definition: session_Session.h:324
The interface for the session information list.
Definition: session_ISessionInfoList.h:32
Being transferred to a session by the joint session feature. (Includes a period with no communication...
Definition: session_Session.h:323
An interface (factory pattern) for generating the classes needed by the network.
Definition: transport_NetworkFactory.h:89
Represents an address used to uniquely identify stations.
Definition: transport_StationConnectionInfo.h:35
size_t bitRateCheckPacketSize
Specifies the IP packet size used for testing when using the bitrate detection feature. The value is in bytes. The expected value is the average size of IP packet sent and received by the application. It must be a multiple of 4. The default is 0.
Definition: session_Session.h:218
Mode
Indicates the type of encryption algorithm.
Definition: common_CryptoSetting.h:47
StationIdConstIterator Begin() const
Gets an iterator for the valid StationId objects in the session (non-const version).
Definition: session_Session.h:1843
Specifies that the disconnection was caused by the local station. You get this value when the local s...
Definition: session_Session.h:304
Specifies that the disconnection was caused by another station in the session. One way to get this va...
Definition: session_Session.h:305
Base class that manages settings specific to session joining.
Definition: session_JoinSessionSetting.h:39
u32 GetSessionId() const
Gets the session ID.
Definition: session_Session.h:1782
An iterator for accessing valid StationId objects in a session (non-const version).
Definition: session_Session.h:386
BitRateCheckMode
Enumerated type for setting the bitrate detection feature.
Definition: session_types.h:56
Indicates that the process of joining a joint session has started. (Only occurs when using the joint ...
Definition: session_Session.h:343
static const s32 NN_PIA_SESSION_INVALID_UPLINK_BIT_RATE_LOWER_LIMIT
This constant represents an invalid bitrate in the bitrate detection feature.
Definition: session_types.h:36
Stores the ID token associated with a Station.
Definition: transport_Station.h:682
Disconnected from the session. Call Cleanup after calling LeaveSessionAsync.
Definition: session_Session.h:325
u32 keepAliveSendingInterval
Specifies the send interval for keep-alive (in milliseconds). The default value is session::NN_PIA_SE...
Definition: session_Session.h:215
Indicates that the host of the session has changed. (Only occurs when host migration is enabled...
Definition: session_Session.h:338
nn::pia::common::CryptoSetting::Mode cryptoMode
Specifies the encryption setting mode. Defaults to common::CryptoSetting::MODE_NOTHING.
Definition: session_Session.h:213
s32 bitRateMeasuringSpan
Sets the time to spend measuring when the bit rate detection feature is used. The value is in millise...
Definition: session_Session.h:219
Specifies that the disconnection was caused by a failed host migration.
Definition: session_Session.h:309
An iterator for accessing valid StationId objects in a session (const version).
Definition: session_Session.h:421
session::NetworkTopology networkTopology
Specifies the network topology setting for the session.
Definition: session_Session.h:168
This is the common base class used inside the Pia library.
Definition: common_RootObject.h:40
Indicates that a joint session started through random matchmaking has been completed. (Only occurs when using the joint session feature.)
Definition: session_Session.h:346
bool isSkipBitRateCheck
Set to skip detection processes when using bitrate detection. Specify true to skip. The default is false.
Definition: session_Session.h:220
Specifies that the local station was kicked out from the session because of a call to the Session::Ki...
Definition: session_Session.h:306
bool IsUsingHostMigration() const
Gets whether host migration is enabled.
Definition: session_Session.h:2903
static Session * GetInstance()
Gets the Session class instance (singleton pattern).
Definition: session_Session.h:493
session::BitRateCheckMode bitRateCheckMode
Settings for the bitrate detection feature.
Definition: session_Session.h:171
bool isEnableMatchmakeAnalysis
Settings for the matchmaking analysis feature.
Definition: session_Session.h:187