1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2011 Index Data
4 Metaproxy is free software; you can redistribute it and/or modify it under
5 the terms of the GNU General Public License as published by the Free
6 Software Foundation; either version 2, or (at your option) any later
9 Metaproxy is distributed in the hope that it will be useful, but WITHOUT ANY
10 WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 #include <metaproxy/origin.hpp>
24 namespace mp = metaproxy_1;
26 mp::Origin::Origin() : m_address(""), m_origin_id(0), m_max_sockets(0)
30 void mp::Origin::set_max_sockets(int max_sockets)
32 m_max_sockets = max_sockets;
35 int mp::Origin::get_max_sockets()
40 void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
46 void mp::Origin::set_custom_session(const std::string &s)
51 std::string mp::Origin::get_address()
56 std::ostream& std::operator<<(std::ostream& os, const mp::Origin& o)
58 if (o.m_address.length())
62 os << ":" << o.m_origin_id;
63 if (o.m_custom_session.length())
64 os << ":" << o.m_custom_session;
71 * c-file-style: "Stroustrup"
72 * indent-tabs-mode: nil
74 * vim: shiftwidth=4 tabstop=8 expandtab