projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
More news
[metaproxy-moved-to-github.git]
/
src
/
origin.cpp
diff --git
a/src/origin.cpp
b/src/origin.cpp
index
db29449
..
6168e1a
100644
(file)
--- a/
src/origin.cpp
+++ b/
src/origin.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2008 Index Data
+ Copyright (C) 2005-2010 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
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
@@
-16,8
+16,8
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-//#include "config.hpp"
-#include "origin.hpp"
+#include "config.hpp"
+#include <metaproxy/origin.hpp>
#include <iostream>
#include <iostream>
@@
-26,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),
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)
{
}
{
}
@@
-50,7
+50,15
@@
unsigned int & mp::Origin::listen_port()
return m_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)
{
void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
{
@@
-59,6
+67,11
@@
void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
m_origin_id = 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 != "")
std::ostream& std::operator<<(std::ostream& os, mp::Origin& o)
{
if (o.m_address != "")
@@
-72,8
+85,9
@@
std::ostream& std::operator<<(std::ostream& os, mp::Origin& o)
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* indent-tabs-mode: nil
- * c-file-style: "stroustrup"
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
*/
+