Samchon Framework for CPP  1.0.0
IPUserPair.hpp
1 #pragma once
2 #include <samchon/API.hpp>
3 
4 #include <set>
5 #include <string>
6 
7 #include <samchon/protocol/Socket.hpp>
8 
9 namespace samchon
10 {
11 namespace protocol
12 {
13 namespace service
14 {
15  class Server;
16  class User;
17 
51  class SAMCHON_FRAMEWORK_API IPUserPair
52  {
53  friend class Server;
54  friend class User;
55 
56  private:
61 
65  std::string ip;
66 
70  std::set<const User*> userSet;
71 
72  private:
76  IPUserPair(Server *server, const std::string &);
77 
93  auto getSessionID(Socket*, size_t)->std::string;
94 
114  auto issueSessionID(size_t) const->std::string;
115  };
116 };
117 };
118 };
Definition: RWMutex.hpp:4
Relationship between IP address and User for issuing session.
Definition: IPUserPair.hpp:51
User containing Client(s) with session-id.
Definition: User.hpp:56
Server * server
The Server containing IP addresses and User(s)
Definition: IPUserPair.hpp:60
std::set< const User * > userSet
User(s) belongs to the IP address.
Definition: IPUserPair.hpp:70
A server for (cloud) service.
Definition: Server.hpp:48
std::string ip
An IP address.
Definition: IPUserPair.hpp:65
Top level namespace of products built from samchon.
Definition: ByteArray.hpp:7