⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kadcppapi.h

📁 a open source project in linux for peer to peer on seep
💻 H
字号:
#ifndef KADCPPAPI_H#define KADCPPAPI_Hextern "C" {#include "int128.h"#include "rbt.h"#include "KadCapi.h"#include "KadClog.h"};#include <string>#include "Logger.h"/** * C++ representation of KadCapi. */class KadCppApi { private: 	KadCcontext context;  	Logger * log; public:	/** Full constructor */	KadCppApi(		  const std::string & inifilename = "kadc.ini", 		  int leafmode = 1,		  int init_network = 0);   	static KadCppApi* getInstance();	/** Destructor */	virtual	~KadCppApi();		/** Close */	void close();		/** Returns number of k-nodes */	int getKNodesCount();		/** Returns number of contacts */	int getContactsCount();		/** Returns firewall status */	int getFirewallStatus();		/** Returns our IP adress as seen by other peers. */	unsigned long int getExternalIP();		/** Returns our local hash ID. */	std::string getHashId();		/** Returns our UDP port number. */	unsigned short int getUDPport();		/** Returns our TCP port number */	unsigned short int getTCPport();		/** Prints a status to output. */	void printStatus();		// KadC style search	int publish(const std::string & key, const std::string & value);	/** search. 	 * Returns the found string, or 0 if not found.	 */	std::string search(const std::string& key);		/** Updates the values in the ini file. */	void updateIniFile();};#endif // KADCPPAPI_H

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -