X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=src%2Forigin.cpp;h=ac2da4447b440764d5c09671651f8e94042bd3ce;hb=4cd9e521c5e96e3fcc5dcec6192571b54a1351c4;hp=b4083721981a25e77e0466dfb5b22873b9e3ee86;hpb=637a685d61a9ff0e3f398a59da426979815c4d68;p=metaproxy-moved-to-github.git diff --git a/src/origin.cpp b/src/origin.cpp index b408372..ac2da44 100644 --- a/src/origin.cpp +++ b/src/origin.cpp @@ -1,7 +1,5 @@ -/* $Id: origin.cpp,v 1.6 2007-05-09 21:23:09 adam Exp $ - Copyright (c) 2005-2007, Index Data. - -This file is part of Metaproxy. +/* This file is part of Metaproxy. + Copyright (C) 2005-2009 Index Data Metaproxy is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -14,10 +12,9 @@ FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License -along with Metaproxy; see the file LICENSE. If not, write to the -Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA -02111-1307, USA. - */ +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA +*/ //#include "config.hpp" #include "origin.hpp" @@ -29,7 +26,7 @@ namespace mp = metaproxy_1; mp::Origin::Origin(std::string listen_host, unsigned int listen_port) : m_type(API), m_address(""), m_origin_id(0), - m_listen_host(listen_host), m_listen_port(listen_port) + m_listen_host(listen_host), m_listen_port(listen_port), m_max_sockets(0) { } @@ -53,7 +50,15 @@ unsigned int & mp::Origin::listen_port() return m_listen_port; }; +void mp::Origin::set_max_sockets(int max_sockets) +{ + m_max_sockets = max_sockets; +} +int mp::Origin::get_max_sockets() +{ + return m_max_sockets; +} void mp::Origin::set_tcpip_address(std::string addr, unsigned long s) { @@ -62,6 +67,11 @@ void mp::Origin::set_tcpip_address(std::string addr, unsigned long s) m_origin_id = s; } +std::string mp::Origin::get_address() +{ + return m_address; +} + std::ostream& std::operator<<(std::ostream& os, mp::Origin& o) { if (o.m_address != "") @@ -75,8 +85,9 @@ std::ostream& std::operator<<(std::ostream& os, mp::Origin& o) /* * Local variables: * c-basic-offset: 4 + * c-file-style: "Stroustrup" * indent-tabs-mode: nil - * c-file-style: "stroustrup" * End: * vim: shiftwidth=4 tabstop=8 expandtab */ +