Changeset 452fd41 in nscp for modules/NSClientListener/NSClientSocket.h
- Timestamp:
- 03/28/05 12:24:08 (8 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- aaa9a22
- Parents:
- 1a5449e
- File:
-
- 1 edited
-
modules/NSClientListener/NSClientSocket.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modules/NSClientListener/NSClientSocket.h
r1a5449e r452fd41 1 1 #pragma once 2 2 #include "resource.h" 3 #include <Thread.h>4 #include <Mutex.h>5 #include <WinSock2.h>6 #include <strEx.h>7 #include <charEx.h>8 3 #include <Socket.h> 9 4 /** … … 33 28 class NSClientSocket : public simpleSocket::Listener { 34 29 private: 30 strEx::splitList allowedHosts_; 35 31 36 32 public: … … 41 37 virtual void onAccept(simpleSocket::Socket client); 42 38 std::string parseRequest(std::string buffer); 39 bool inAllowedHosts(std::string s) { 40 if (allowedHosts_.empty()) 41 return true; 42 strEx::splitList::const_iterator cit; 43 for (cit = allowedHosts_.begin();cit!=allowedHosts_.end();++cit) { 44 if ( (*cit) == s) 45 return true; 46 } 47 return false; 48 } 49 50 public: 51 void setAllowedHosts(strEx::splitList allowedHosts) { 52 allowedHosts_ = allowedHosts; 53 } 54 43 55 }; 44 56
Note: See TracChangeset
for help on using the changeset viewer.








