#pragma once #include class DownStream; struct PendingAccount; class DownStreamMgr : public a8::Singleton { private: DownStreamMgr() {}; friend class a8::Singleton; public: void Init(); void UnInit(); #if 0 void OnTargetServerDisconnect(a8::XParams& param); void OnTargetServerConnect(a8::XParams& param); #endif std::weak_ptr GetGameClientBySocket(int sockhande); void BindUpStream(int socket_handle, int conn_instance_id); void AddPendingAccount(const std::string& account_id, int socket_handle, long long req_tick); private: void OnClientDisconnect(int socket_handle); std::shared_ptr GetPendingAccount(int socket_handle); void RemovePendingAccount(int socket_handle); private: f8::Attacher timer_attacher_; std::map> socket_hash_; std::map> pending_account_hash_; };