196 std::string serverName;
197 int serverVersion{ 0 };
200 std::string ) ->
bool
204 virtual void close() {}
206 virtual void CreateNewRoom(std::string name,
208 std::string password)
212 virtual void EnterRoom(std::string name, std::string password) {}
214 virtual void RequestRoomInfo(std::string name) {}
215 virtual void SendChat(
const std::string& message, std::string tab,
int type)
218 virtual void ReportNSSOnOff(
int i) {}
240 virtual void Login(std::string user, std::string pass) {}
241 virtual void Logout() {}
242 virtual void OnMusicSelect(){};
243 virtual void OffMusicSelect(){};
244 virtual void OnRoomSelect(){};
245 virtual void OffRoomSelect(){};
246 virtual void OnOptions(){};
247 virtual void OffOptions(){};
248 virtual void OnEval(){};
249 virtual void OffEval(){};
250 virtual void SendMPLeaderboardUpdate(
float wife, std::string& jdgstr){};
255 std::unique_ptr<std::thread> thread;
256 std::mutex messageBufferMutex;
257 std::vector<std::unique_ptr<rapidjson::Document>> newMessages;
258 unsigned int msgId{ 0 };
260 std::string errorMsg;
261 std::shared_ptr<ws_client> client{
nullptr };
262 std::shared_ptr<wss_client> secure_client{
nullptr };
263 std::shared_ptr<websocketpp::connection_hdl> hdl{
nullptr };
269 bool waitingForTimeout{
false };
270 bool creatingRoom{
false };
271 clock_t timeoutStart = 0;
273 std::function<void(
void)> onTimeout;
274 std::string roomName;
275 std::string roomDesc;
276 bool inRoom{
false };
279 std::string address) ->
bool override;
280 void close()
override;
282 void Login(std::string user, std::string pass)
override;
283 void Logout()
override;
284 void SendChat(
const std::string& message,
287 void CreateNewRoom(std::string name,
289 std::string password)
override;
290 void EnterRoom(std::string name, std::string password)
override;
294 void OnMusicSelect()
override;
295 void OnOptions()
override;
296 void OffOptions()
override;
297 void OnEval()
override;
298 void OffEval()
override;
299 void SendMPLeaderboardUpdate(
float wife, std::string& jdgstr)
override;
301 void Send(
const char* msg);
314 std::map<std::pair<std::string, int>, std::vector<std::string>> rawMap;
316 auto operator[](
const std::pair<std::string, int>& p)
317 -> std::vector<std::string>&
320 return rawMap.operator[](std::make_pair(std::string(
""), 0));
323 return rawMap.operator[](p);
336 void ReportScore(
int playerID,
341 void ReportScore(
int playerID,
348 void ReportSongOver();
350 void ReportNSSOnOff(
int i);
352 void OnMusicSelect();
353 void OffMusicSelect();
355 void OffRoomSelect();
361 void StartRequest(
short position);
362 auto GetServerName() -> std::string;
364 void CreateNewRoom(std::string name,
365 std::string desc =
"",
366 std::string password =
"");
367 void EnterRoom(std::string name, std::string password =
"");
369 void RequestRoomInfo(std::string name);
371 void PostStartUp(
const std::string& ServerIP);
373 auto IsETTP() -> bool;
375 void CloseConnection();
377 void DisplayStartupStatus();
382 void Update(
float fDeltaTime);
387 std::string loggedInUsername;
388 std::string loginResponse;
392 std::vector<int> m_PlayerStatus;
394 std::vector<int> m_ActivePlayer;
395 std::vector<std::string> m_PlayerNames;
396 std::vector<bool> m_PlayerReady;
397 std::vector<std::string> commonpacks;
400 std::vector<std::string> fl_PlayerNames;
401 std::vector<int> fl_PlayerStates;
404 std::vector<EndOfGame_PlayerData> m_EvalPlayerData;
407 auto ChangedScoreboard(
int Column)
410 std::string m_Scoreboard[NUM_NSScoreBoardColumn];
412 std::set<std::string> lobbyuserlist;
414 void SendMPLeaderboardUpdate(
float wife, std::string& jdgstr);
417 void SendChat(
const std::string& message,
418 std::string tab =
"",
420 std::string m_WaitingChat;
423 std::string m_sMainTitle;
424 std::string m_sArtist;
425 std::string m_sSubTitle;
426 std::string m_sFileHash;
427 std::string chartkey;
428 Song* song{
nullptr };
429 Steps* steps{
nullptr };
430 std::map<std::string, GameplayScore> mpleaderboard;
431 void PushMPLeaderboard(lua_State* L);
432 Difficulty difficulty;
437 void SelectUserSong();
439 auto GetServerVersion() -> int;
441 std::string m_sChatText;
443 StepManiaLanServer* LANserver;
445 void GetListOfLANServers(std::vector<NetServerInfo>& AllServers);
452 static auto GetCurrentSMBuild(
LoadingWindow* ld) ->
unsigned long;
456 void Login(std::string user, std::string pass);
458 std::vector<RoomData> m_Rooms;
459 std::vector<ChartRequest*> requests;
460 std::vector<ChartRequest*> staleRequests;
462 auto TranslateStepType(
int score) -> SMOStepType;
463 std::vector<NetServerInfo> m_vAllLANServers;
464 bool m_scoreboardchange[NUM_NSScoreBoardColumn];
467 void PushSelf(lua_State* L);