first working

This commit is contained in:
C
2022-07-17 15:41:13 +05:00
parent 497a441e0d
commit 36ff1cbd7b
3 changed files with 175 additions and 62 deletions
+7 -4
View File
@@ -7,20 +7,21 @@
class session
{
private:
DWORD procId = 0;
std::vector<DWORD> procIds;
uint32_t sessId = 0;
uint16_t port = 0;
std::string sessLink;
std::vector<user> users;
std::string ownerIp;
public:
session() {}
session(DWORD procId, uint32_t sessId, std::string sessLink, std::string ownerIp)
session(uint32_t sessId, std::string sessLink, std::string ownerIp, uint16_t port)
{
this->procId = procId;
this->sessId = sessId;
this->sessLink = sessLink;
this->ownerIp = ownerIp;
this->port = port;
}
void addUser(user u)
{
@@ -34,7 +35,9 @@ public:
}
inline size_t getUsersCount() const { return users.size(); }
inline const uint32_t& getId() const { return sessId; }
inline const DWORD& getProcId() const { return procId; }
inline const std::vector<DWORD>& getProcIds() const { return procIds; }
inline void addProcId(DWORD procId) { procIds.push_back(procId); }
inline const std::string& getOwnerIp() const { return ownerIp; }
inline const uint16_t getPort() const { return port; }
};