2011-04-27 11:58:34 +00:00
|
|
|
/*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Copyright 2011-2013 Blender Foundation
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
2011-04-27 11:58:34 +00:00
|
|
|
*
|
2013-08-18 14:16:15 +00:00
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
2014-12-25 01:50:24 +00:00
|
|
|
* limitations under the License.
|
2011-04-27 11:58:34 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DEVICE_NETWORK_H__
|
|
|
|
#define __DEVICE_NETWORK_H__
|
|
|
|
|
2011-09-14 22:26:55 +00:00
|
|
|
#ifdef WITH_NETWORK
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
#include <boost/archive/text_iarchive.hpp>
|
|
|
|
#include <boost/archive/text_oarchive.hpp>
|
2014-02-05 20:55:51 +00:00
|
|
|
#include <boost/archive/binary_iarchive.hpp>
|
|
|
|
#include <boost/archive/binary_oarchive.hpp>
|
2011-04-27 11:58:34 +00:00
|
|
|
#include <boost/array.hpp>
|
|
|
|
#include <boost/asio.hpp>
|
|
|
|
#include <boost/bind.hpp>
|
|
|
|
#include <boost/serialization/vector.hpp>
|
|
|
|
#include <boost/thread.hpp>
|
|
|
|
|
|
|
|
#include <iostream>
|
2013-12-07 01:29:53 +00:00
|
|
|
#include <sstream>
|
|
|
|
#include <deque>
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
#include "buffers.h"
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
#include "util_foreach.h"
|
|
|
|
#include "util_list.h"
|
2012-12-21 11:13:46 +00:00
|
|
|
#include "util_map.h"
|
2011-04-27 11:58:34 +00:00
|
|
|
#include "util_string.h"
|
|
|
|
|
|
|
|
CCL_NAMESPACE_BEGIN
|
|
|
|
|
|
|
|
using std::cout;
|
|
|
|
using std::cerr;
|
|
|
|
using std::hex;
|
|
|
|
using std::setw;
|
|
|
|
using std::exception;
|
|
|
|
|
|
|
|
using boost::asio::ip::tcp;
|
|
|
|
|
|
|
|
static const int SERVER_PORT = 5120;
|
|
|
|
static const int DISCOVER_PORT = 5121;
|
|
|
|
static const string DISCOVER_REQUEST_MSG = "REQUEST_RENDER_SERVER_IP";
|
|
|
|
static const string DISCOVER_REPLY_MSG = "REPLY_RENDER_SERVER_IP";
|
|
|
|
|
2014-02-05 20:55:51 +00:00
|
|
|
#if 0
|
|
|
|
typedef boost::archive::text_oarchive o_archive;
|
|
|
|
typedef boost::archive::text_iarchive i_archive;
|
|
|
|
#else
|
|
|
|
typedef boost::archive::binary_oarchive o_archive;
|
|
|
|
typedef boost::archive::binary_iarchive i_archive;
|
|
|
|
#endif
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
/* Serialization of device memory */
|
|
|
|
|
|
|
|
class network_device_memory : public device_memory
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
network_device_memory() {}
|
|
|
|
~network_device_memory() { device_pointer = 0; };
|
|
|
|
|
|
|
|
vector<char> local_data;
|
|
|
|
};
|
|
|
|
|
2014-02-05 20:55:51 +00:00
|
|
|
/* Common netowrk error function / object for both DeviceNetwork and DeviceServer*/
|
|
|
|
class NetworkError {
|
|
|
|
public:
|
|
|
|
NetworkError() {
|
|
|
|
error = "";
|
|
|
|
error_count = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
~NetworkError() {}
|
|
|
|
|
|
|
|
void network_error(const string& message) {
|
|
|
|
error = message;
|
|
|
|
error_count += 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool have_error() {
|
|
|
|
return true ? error_count > 0 : false;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
string error;
|
|
|
|
int error_count;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
/* Remote procedure call Send */
|
|
|
|
|
|
|
|
class RPCSend {
|
|
|
|
public:
|
2014-02-05 20:55:51 +00:00
|
|
|
RPCSend(tcp::socket& socket_, NetworkError* e, const string& name_ = "")
|
2012-12-21 11:13:46 +00:00
|
|
|
: name(name_), socket(socket_), archive(archive_stream), sent(false)
|
2011-04-27 11:58:34 +00:00
|
|
|
{
|
|
|
|
archive & name_;
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func = e;
|
2013-12-07 01:29:53 +00:00
|
|
|
fprintf(stderr, "rpc send %s\n", name.c_str());
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
~RPCSend()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void add(const device_memory& mem)
|
|
|
|
{
|
|
|
|
archive & mem.data_type & mem.data_elements & mem.data_size;
|
2014-03-29 12:03:48 +00:00
|
|
|
archive & mem.data_width & mem.data_height & mem.data_depth & mem.device_pointer;
|
2012-12-21 11:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> void add(const T& data)
|
|
|
|
{
|
|
|
|
archive & data;
|
|
|
|
}
|
|
|
|
|
|
|
|
void add(const DeviceTask& task)
|
|
|
|
{
|
|
|
|
int type = (int)task.type;
|
|
|
|
archive & type & task.x & task.y & task.w & task.h;
|
2013-08-30 23:49:38 +00:00
|
|
|
archive & task.rgba_byte & task.rgba_half & task.buffer & task.sample & task.num_samples;
|
2013-05-14 21:18:20 +00:00
|
|
|
archive & task.offset & task.stride;
|
2012-12-21 11:13:46 +00:00
|
|
|
archive & task.shader_input & task.shader_output & task.shader_eval_type;
|
|
|
|
archive & task.shader_x & task.shader_w;
|
2013-12-07 01:29:53 +00:00
|
|
|
archive & task.need_finish_queue;
|
2012-12-21 11:13:46 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void add(const RenderTile& tile)
|
|
|
|
{
|
|
|
|
archive & tile.x & tile.y & tile.w & tile.h;
|
|
|
|
archive & tile.start_sample & tile.num_samples & tile.sample;
|
2013-12-07 01:29:53 +00:00
|
|
|
archive & tile.resolution & tile.offset & tile.stride;
|
2013-08-30 23:49:38 +00:00
|
|
|
archive & tile.buffer & tile.rng_state;
|
2012-12-21 11:13:46 +00:00
|
|
|
}
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
void write()
|
|
|
|
{
|
|
|
|
boost::system::error_code error;
|
|
|
|
|
|
|
|
/* get string from stream */
|
|
|
|
string archive_str = archive_stream.str();
|
|
|
|
|
|
|
|
/* first send fixed size header with size of following data */
|
|
|
|
ostringstream header_stream;
|
|
|
|
header_stream << setw(8) << hex << archive_str.size();
|
|
|
|
string header_str = header_stream.str();
|
|
|
|
|
|
|
|
boost::asio::write(socket,
|
|
|
|
boost::asio::buffer(header_str),
|
|
|
|
boost::asio::transfer_all(), error);
|
|
|
|
|
|
|
|
if(error.value())
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error(error.message());
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* then send actual data */
|
|
|
|
boost::asio::write(socket,
|
|
|
|
boost::asio::buffer(archive_str),
|
|
|
|
boost::asio::transfer_all(), error);
|
|
|
|
|
|
|
|
if(error.value())
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error(error.message());
|
2012-12-21 11:13:46 +00:00
|
|
|
|
|
|
|
sent = true;
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void write_buffer(void *buffer, size_t size)
|
|
|
|
{
|
|
|
|
boost::system::error_code error;
|
|
|
|
|
|
|
|
boost::asio::write(socket,
|
|
|
|
boost::asio::buffer(buffer, size),
|
|
|
|
boost::asio::transfer_all(), error);
|
|
|
|
|
|
|
|
if(error.value())
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error(error.message());
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
protected:
|
2011-04-27 11:58:34 +00:00
|
|
|
string name;
|
|
|
|
tcp::socket& socket;
|
|
|
|
ostringstream archive_stream;
|
2014-02-05 20:55:51 +00:00
|
|
|
o_archive archive;
|
2012-12-21 11:13:46 +00:00
|
|
|
bool sent;
|
2014-02-05 20:55:51 +00:00
|
|
|
NetworkError *error_func;
|
2012-12-21 11:13:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Remote procedure call Receive */
|
2011-04-27 11:58:34 +00:00
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
class RPCReceive {
|
|
|
|
public:
|
2014-02-05 20:55:51 +00:00
|
|
|
RPCReceive(tcp::socket& socket_, NetworkError* e )
|
2011-04-27 11:58:34 +00:00
|
|
|
: socket(socket_), archive_stream(NULL), archive(NULL)
|
|
|
|
{
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func = e;
|
2011-04-27 11:58:34 +00:00
|
|
|
/* read head with fixed size */
|
2012-02-25 16:04:03 +00:00
|
|
|
vector<char> header(8);
|
2014-02-05 20:55:51 +00:00
|
|
|
boost::system::error_code error;
|
|
|
|
size_t len = boost::asio::read(socket, boost::asio::buffer(header), error);
|
|
|
|
|
2014-05-04 16:19:08 +00:00
|
|
|
if(error.value()) {
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error(error.message());
|
|
|
|
}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* verify if we got something */
|
|
|
|
if(len == header.size()) {
|
|
|
|
/* decode header */
|
|
|
|
string header_str(&header[0], header.size());
|
|
|
|
istringstream header_stream(header_str);
|
|
|
|
|
|
|
|
size_t data_size;
|
|
|
|
|
|
|
|
if((header_stream >> hex >> data_size)) {
|
2013-12-07 01:29:53 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
vector<char> data(data_size);
|
2014-02-05 20:55:51 +00:00
|
|
|
size_t len = boost::asio::read(socket, boost::asio::buffer(data), error);
|
|
|
|
|
|
|
|
if(error.value())
|
|
|
|
error_func->network_error(error.message());
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
if(len == data_size) {
|
2011-10-03 15:31:45 +00:00
|
|
|
archive_str = (data.size())? string(&data[0], data.size()): string("");
|
2014-02-05 20:55:51 +00:00
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
archive_stream = new istringstream(archive_str);
|
2014-02-05 20:55:51 +00:00
|
|
|
archive = new i_archive(*archive_stream);
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
*archive & name;
|
2013-12-07 01:29:53 +00:00
|
|
|
fprintf(stderr, "rpc receive %s\n", name.c_str());
|
|
|
|
}
|
|
|
|
else {
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error("Network receive error: data size doesn't match header");
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
}
|
2013-12-07 01:29:53 +00:00
|
|
|
else {
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error("Network receive error: can't decode data size from header");
|
2013-12-07 01:29:53 +00:00
|
|
|
}
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
2013-12-07 01:29:53 +00:00
|
|
|
else {
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error("Network receive error: invalid header size");
|
2013-12-07 01:29:53 +00:00
|
|
|
}
|
2011-04-27 11:58:34 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~RPCReceive()
|
|
|
|
{
|
|
|
|
delete archive;
|
|
|
|
delete archive_stream;
|
|
|
|
}
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
void read(network_device_memory& mem)
|
|
|
|
{
|
|
|
|
*archive & mem.data_type & mem.data_elements & mem.data_size;
|
2014-03-29 12:03:48 +00:00
|
|
|
*archive & mem.data_width & mem.data_height & mem.data_depth & mem.device_pointer;
|
2012-12-21 11:13:46 +00:00
|
|
|
|
|
|
|
mem.data_pointer = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
template<typename T> void read(T& data)
|
|
|
|
{
|
|
|
|
*archive & data;
|
|
|
|
}
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
void read_buffer(void *buffer, size_t size)
|
|
|
|
{
|
2014-02-05 20:55:51 +00:00
|
|
|
boost::system::error_code error;
|
|
|
|
size_t len = boost::asio::read(socket, boost::asio::buffer(buffer, size), error);
|
|
|
|
|
2014-05-04 16:19:08 +00:00
|
|
|
if(error.value()) {
|
2014-02-05 20:55:51 +00:00
|
|
|
error_func->network_error(error.message());
|
|
|
|
}
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
if(len != size)
|
|
|
|
cout << "Network receive error: buffer size doesn't match expected size\n";
|
|
|
|
}
|
|
|
|
|
2012-12-21 11:13:46 +00:00
|
|
|
void read(DeviceTask& task)
|
|
|
|
{
|
|
|
|
int type;
|
|
|
|
|
|
|
|
*archive & type & task.x & task.y & task.w & task.h;
|
2013-08-30 23:49:38 +00:00
|
|
|
*archive & task.rgba_byte & task.rgba_half & task.buffer & task.sample & task.num_samples;
|
2013-12-07 01:29:53 +00:00
|
|
|
*archive & task.offset & task.stride;
|
2012-12-21 11:13:46 +00:00
|
|
|
*archive & task.shader_input & task.shader_output & task.shader_eval_type;
|
|
|
|
*archive & task.shader_x & task.shader_w;
|
2013-12-07 01:29:53 +00:00
|
|
|
*archive & task.need_finish_queue;
|
2012-12-21 11:13:46 +00:00
|
|
|
|
|
|
|
task.type = (DeviceTask::Type)type;
|
|
|
|
}
|
|
|
|
|
|
|
|
void read(RenderTile& tile)
|
|
|
|
{
|
|
|
|
*archive & tile.x & tile.y & tile.w & tile.h;
|
|
|
|
*archive & tile.start_sample & tile.num_samples & tile.sample;
|
|
|
|
*archive & tile.resolution & tile.offset & tile.stride;
|
2013-12-07 01:29:53 +00:00
|
|
|
*archive & tile.buffer & tile.rng_state;
|
2012-12-21 11:13:46 +00:00
|
|
|
|
|
|
|
tile.buffers = NULL;
|
|
|
|
}
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
string name;
|
2012-12-21 11:13:46 +00:00
|
|
|
|
|
|
|
protected:
|
2011-04-27 11:58:34 +00:00
|
|
|
tcp::socket& socket;
|
|
|
|
string archive_str;
|
|
|
|
istringstream *archive_stream;
|
2014-02-05 20:55:51 +00:00
|
|
|
i_archive *archive;
|
|
|
|
NetworkError *error_func;
|
2012-12-21 11:13:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Server auto discovery */
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
class ServerDiscovery {
|
|
|
|
public:
|
|
|
|
ServerDiscovery(bool discover = false)
|
|
|
|
: listen_socket(io_service), collect_servers(false)
|
|
|
|
{
|
|
|
|
/* setup listen socket */
|
2012-02-25 16:04:03 +00:00
|
|
|
listen_endpoint.address(boost::asio::ip::address_v4::any());
|
2011-04-27 11:58:34 +00:00
|
|
|
listen_endpoint.port(DISCOVER_PORT);
|
|
|
|
|
|
|
|
listen_socket.open(listen_endpoint.protocol());
|
|
|
|
|
|
|
|
boost::asio::socket_base::reuse_address option(true);
|
|
|
|
listen_socket.set_option(option);
|
|
|
|
|
2012-02-25 16:04:03 +00:00
|
|
|
listen_socket.bind(listen_endpoint);
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* setup receive callback */
|
|
|
|
async_receive();
|
|
|
|
|
|
|
|
/* start server discovery */
|
|
|
|
if(discover) {
|
|
|
|
collect_servers = true;
|
|
|
|
servers.clear();
|
|
|
|
|
|
|
|
broadcast_message(DISCOVER_REQUEST_MSG);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* start thread */
|
|
|
|
work = new boost::asio::io_service::work(io_service);
|
|
|
|
thread = new boost::thread(boost::bind(&boost::asio::io_service::run, &io_service));
|
|
|
|
}
|
|
|
|
|
|
|
|
~ServerDiscovery()
|
|
|
|
{
|
|
|
|
io_service.stop();
|
|
|
|
thread->join();
|
|
|
|
delete thread;
|
|
|
|
delete work;
|
|
|
|
}
|
|
|
|
|
2013-12-07 01:29:53 +00:00
|
|
|
vector<string> get_server_list()
|
2011-04-27 11:58:34 +00:00
|
|
|
{
|
2013-12-07 01:29:53 +00:00
|
|
|
vector<string> result;
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
mutex.lock();
|
2013-12-07 01:29:53 +00:00
|
|
|
result = vector<string>(servers.begin(), servers.end());
|
2011-04-27 11:58:34 +00:00
|
|
|
mutex.unlock();
|
|
|
|
|
|
|
|
return result;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
void handle_receive_from(const boost::system::error_code& error, size_t size)
|
|
|
|
{
|
|
|
|
if(error) {
|
|
|
|
cout << "Server discovery receive error: " << error.message() << "\n";
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(size > 0) {
|
|
|
|
string msg = string(receive_buffer, size);
|
|
|
|
|
|
|
|
/* handle incoming message */
|
|
|
|
if(collect_servers) {
|
|
|
|
if(msg == DISCOVER_REPLY_MSG) {
|
|
|
|
string address = receive_endpoint.address().to_string();
|
|
|
|
|
|
|
|
mutex.lock();
|
|
|
|
|
|
|
|
/* add address if it's not already in the list */
|
2013-12-07 01:29:53 +00:00
|
|
|
bool found = std::find(servers.begin(), servers.end(),
|
2014-05-04 16:19:08 +00:00
|
|
|
address) != servers.end();
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
if(!found)
|
|
|
|
servers.push_back(address);
|
|
|
|
|
|
|
|
mutex.unlock();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
/* reply to request */
|
|
|
|
if(msg == DISCOVER_REQUEST_MSG)
|
|
|
|
broadcast_message(DISCOVER_REPLY_MSG);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
async_receive();
|
|
|
|
}
|
|
|
|
|
|
|
|
void async_receive()
|
|
|
|
{
|
|
|
|
listen_socket.async_receive_from(
|
|
|
|
boost::asio::buffer(receive_buffer), receive_endpoint,
|
|
|
|
boost::bind(&ServerDiscovery::handle_receive_from, this,
|
|
|
|
boost::asio::placeholders::error, boost::asio::placeholders::bytes_transferred));
|
|
|
|
}
|
|
|
|
|
|
|
|
void broadcast_message(const string& msg)
|
|
|
|
{
|
|
|
|
/* setup broadcast socket */
|
|
|
|
boost::asio::ip::udp::socket socket(io_service);
|
|
|
|
|
|
|
|
socket.open(boost::asio::ip::udp::v4());
|
|
|
|
|
|
|
|
boost::asio::socket_base::broadcast option(true);
|
|
|
|
socket.set_option(option);
|
|
|
|
|
|
|
|
boost::asio::ip::udp::endpoint broadcast_endpoint(
|
|
|
|
boost::asio::ip::address::from_string("255.255.255.255"), DISCOVER_PORT);
|
|
|
|
|
|
|
|
/* broadcast message */
|
|
|
|
socket.send_to(boost::asio::buffer(msg), broadcast_endpoint);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* network service and socket */
|
|
|
|
boost::asio::io_service io_service;
|
|
|
|
boost::asio::ip::udp::endpoint listen_endpoint;
|
|
|
|
boost::asio::ip::udp::socket listen_socket;
|
|
|
|
|
|
|
|
/* threading */
|
|
|
|
boost::thread *thread;
|
|
|
|
boost::asio::io_service::work *work;
|
|
|
|
boost::mutex mutex;
|
|
|
|
|
|
|
|
/* buffer and endpoint for receiving messages */
|
|
|
|
char receive_buffer[256];
|
|
|
|
boost::asio::ip::udp::endpoint receive_endpoint;
|
2013-12-07 01:29:53 +00:00
|
|
|
|
|
|
|
// os, version, devices, status, host name, group name, ip as far as fields go
|
|
|
|
struct ServerInfo {
|
|
|
|
string cycles_version;
|
|
|
|
string os;
|
|
|
|
int device_count;
|
|
|
|
string status;
|
|
|
|
string host_name;
|
|
|
|
string group_name;
|
|
|
|
string host_addr;
|
|
|
|
};
|
2011-04-27 11:58:34 +00:00
|
|
|
|
|
|
|
/* collection of server addresses in list */
|
|
|
|
bool collect_servers;
|
2013-12-07 01:29:53 +00:00
|
|
|
vector<string> servers;
|
2011-04-27 11:58:34 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
CCL_NAMESPACE_END
|
|
|
|
|
2011-09-14 22:26:55 +00:00
|
|
|
#endif
|
|
|
|
|
2011-04-27 11:58:34 +00:00
|
|
|
#endif /* __DEVICE_NETWORK_H__ */
|
|
|
|
|