summaryrefslogtreecommitdiff
path: root/src/anyrtpproxy/options.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/anyrtpproxy/options.h')
-rw-r--r--src/anyrtpproxy/options.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/anyrtpproxy/options.h b/src/anyrtpproxy/options.h
index 50e16f9..af09d4f 100644
--- a/src/anyrtpproxy/options.h
+++ b/src/anyrtpproxy/options.h
@@ -48,11 +48,8 @@ class Host
{
public:
Host(std::string addr, std::string port) : addr_(addr), port_(port) {}
- Host(std::string addr_port)
- {
- std::istringstream iss(addr_port);
- getline(iss, addr_, ':');
- if(!(iss >> port_)) port_ = "";
+ Host(std::string addr_port) {
+ splitAndSetAddrPort(addr_port);
}
std::string toString() const
{
@@ -63,6 +60,9 @@ public:
std::string addr_;
std::string port_;
+
+protected:
+ void splitAndSetAddrPort(std::string addr_port);
};
typedef std::list<Host> HostList;