Remove old files.

Gonna make this library in a C compatible way.
This commit is contained in:
Nicolás Ortega Froysa
2017-09-18 10:08:36 +02:00
parent 83ed9b2a86
commit 4b562c3aa7
4 changed files with 5 additions and 134 deletions

View File

@ -1,21 +0,0 @@
/*
* Copyright (C) 2017 Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
* Author: Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include "Node.hpp"

View File

@ -1,78 +0,0 @@
/*
* Copyright (C) 2017 Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
* Author: Ortega Froysa, Nicolás <nortega@themusicinnoise.net>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#pragma once
#include <opendht.h>
#include <string>
#ifndef DEFAULT_PORT
# define DEFAULT_PORT 4323
#endif
namespace neocomm {
/**
* @brief A node meant to connect to the neocomm network.
*/
class Node {
public:
/**
* @brief Initialize local node.
*/
Node();
virtual ~Node();
/**
* @brief Bind the node to a port.
*
* @param port Local port to bind to.
*/
void bind(const short &port = DEFAULT_PORT);
/**
* @brief Connect to a network via specified host.
*
* @param host Hostname of network node.
* @param port Connection port/service.
*/
void connect(const std::string &host, const short &port);
/**
* @brief Load a file of nodes which have been used before.
*
* @param path Path to the node export file.
*/
void connect(const std::string &path);
/**
* @brief Export the current list of nodes into a file.
*
* @param path Path to the file in which to save the node list.
*/
void exportNodeList(const std::string &path);
/**
* @brief Retrieve the current status of the connection.
*
* @return String describing connection status.
*/
//inline const std::string getStatus();
private:
dht::DhtRunner node;
dht::NetId status;
};
}