2 #include <samchon/API.hpp> 4 #include <samchon/Map.hpp> 5 #include <samchon/SmartPointer.hpp> 6 #include <samchon/protocol/IProtocol.hpp> 10 #include <samchon/library/RWMutex.hpp> 11 #include <samchon/protocol/service/ServiceKeeper.hpp> 12 #include <samchon/protocol/Socket.hpp> 19 #define KEEP_USER_ALIVE auto &keeper = SmartPointer<User>(this); 56 class SAMCHON_FRAMEWORK_API
User 57 :
private Map<size_t, SmartPointer<Client>>,
215 auto size() const->
size_t;
216 auto begin() const->const_iterator;
217 auto end() const->const_iterator;
225 auto getServer() const->
Server*;
232 auto getSemaphore() const->library::Semaphore*;
237 auto getID() const->
std::
string;
244 auto getAuthority() const ->
int;
253 virtual auto createClient()->
Client* = 0;
262 void addClient(Socket*);
306 void eraseClient(
size_t);
328 void goJoin(
std::shared_ptr<Invoke>);
346 virtual
void goLogout();
355 virtual auto doLogin(
std::shared_ptr<Invoke>) ->
bool = 0;
363 virtual auto doJoin(
std::shared_ptr<Invoke>) ->
bool = 0;
369 virtual
void sendData(
std::shared_ptr<Invoke>) override;
370 virtual
void replyData(
std::shared_ptr<Invoke>) override;
library::Semaphore * semaphore
Semaphore to limit number of thread.
int authority
Authority allocated to user.
Server * server
Server containing the user.
Relationship between IP address and User for issuing session.
User containing Client(s) with session-id.
A server for (cloud) service.
std::string sessionID
Session ID of the user.
A network boundary with the client in an User.
std::string id
Account id.
An interface of Invoke message chain.
Standard message of network I/O.
library::RWMutex mtx
Mutex for container.
Top level namespace of products built from samchon.