1 /* This file is part of Metaproxy.
2 Copyright (C) 2005-2009 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
19 //#include "config.hpp"
24 namespace mp = metaproxy_1;
26 mp::Origin::Origin(std::string listen_host,
27 unsigned int listen_port)
28 : m_type(API), m_address(""), m_origin_id(0),
29 m_listen_host(listen_host), m_listen_port(listen_port), m_max_sockets(0)
33 std::string mp::Origin::listen_host() const
38 std::string & mp::Origin::listen_host()
43 unsigned int mp::Origin::listen_port() const
48 unsigned int & mp::Origin::listen_port()
53 void mp::Origin::set_max_sockets(int max_sockets)
55 m_max_sockets = max_sockets;
58 int mp::Origin::get_max_sockets()
63 void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
70 std::ostream& std::operator<<(std::ostream& os, mp::Origin& o)
72 if (o.m_address != "")
76 os << ":" << o.m_origin_id;
83 * c-file-style: "Stroustrup"
84 * indent-tabs-mode: nil
86 * vim: shiftwidth=4 tabstop=8 expandtab