Added IPAddressList capability and whitelist/blacklist capability.
This commit is contained in:
1 parent
2b9749c4b2
commit
5e5e626d28
9 files changed
+111
-24
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#include "IPAddressList.h"
|
||||
|
||||
namespace core {
|
||||
|
||||
IPAddressList::IPAddressList() {}
|
||||
|
||||
std::map<std::string, IPAddress> IPAddressList::getList() {
|
||||
return list;
|
||||
}
|
||||
|
||||
bool IPAddressList::add(IPAddress ipAddress) {
|
||||
list.insert(std::make_pair(ipAddress.getClientAddress(), ipAddress));
|
||||
}
|
||||
|
||||
bool IPAddressList::remove(IPAddress ipAddress) {
|
||||
|
||||
}
|
||||
|
||||
bool IPAddressList::contains(std::string ipAddress) {
|
||||
return list.find(ipAddress) != list.end();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user