kadcppapi.h

来自「a open source project in linux for peer 」· C头文件 代码 · 共 79 行

H
79
字号
#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 + =
减小字号Ctrl + -
显示快捷键?