Esempio n. 1
0
#include "entitydef/common.hpp"
#include "common.hpp"

//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	CLIENT所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(ClientInterface)
	// 服务端hello返回。
	CLIENT_MESSAGE_DECLARE_STREAM(onHelloCB,								MERCURY_VARIABLE_MESSAGE)

	// 和服务端的版本不匹配
	CLIENT_MESSAGE_DECLARE_STREAM(onVersionNotMatch,						MERCURY_VARIABLE_MESSAGE)

	// 创建账号失败。
	CLIENT_MESSAGE_DECLARE_STREAM(onCreateAccountResult,					MERCURY_VARIABLE_MESSAGE)

	// 登录成功。
	CLIENT_MESSAGE_DECLARE_STREAM(onLoginSuccessfully,						MERCURY_VARIABLE_MESSAGE)

	// 登录失败。
	CLIENT_MESSAGE_DECLARE_STREAM(onLoginFailed,							MERCURY_VARIABLE_MESSAGE)
#endif
#include "messagelog_interface_macros.hpp"
#include "network/interface_defs.hpp"
//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	Messagelog所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(MessagelogInterface)
	// 某app注册自己的接口地址到本app
	MESSAGELOG_MESSAGE_DECLARE_ARGS10(onRegisterNewApp,						MERCURY_VARIABLE_MESSAGE,
									int32,									uid, 
									std::string,							username,
									int8,									componentType, 
									uint64,									componentID, 
									int8,									globalorderID,
									int8,									grouporderID,
									uint32,									intaddr, 
									uint16,									intport,
									uint32,									extaddr, 
									uint16,									extport)

	// 某app主动请求look。
	MESSAGELOG_MESSAGE_DECLARE_ARGS0(lookApp,								MERCURY_FIXED_MESSAGE)
Esempio n. 3
0
#endif
#include "baseappmgr_interface_macros.hpp"
#include "network/interface_defs.hpp"
//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	BASEAPPMGR所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(BaseappmgrInterface)
	// 某app注册自己的接口地址到本app
	BASEAPPMGR_MESSAGE_DECLARE_ARGS8(onRegisterNewApp,						MERCURY_VARIABLE_MESSAGE,
									int32,									uid, 
									std::string,							username,
									int8,									componentType, 
									uint64,									componentID, 
									uint32,									intaddr, 
									uint16,									intport,
									uint32,									extaddr, 
									uint16,									extport)

	// 某app主动请求look。
	BASEAPPMGR_MESSAGE_DECLARE_ARGS0(lookApp,								MERCURY_FIXED_MESSAGE)

	// 某个app向本app告知处于活动状态。
Esempio n. 4
0
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	Dbmgr消息宏,  参数为流, 需要自己解开
*/

/**
	DBMGR所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(DbmgrInterface)
	// 某app注册自己的接口地址到本app
	DBMGR_MESSAGE_DECLARE_ARGS11(onRegisterNewApp,					MERCURY_VARIABLE_MESSAGE,
									int32,							uid, 
									std::string,					username,
									int8,							componentType, 
									uint64,							componentID, 
									int8,							globalorderID,
									int8,							grouporderID,
									uint32,							intaddr, 
									uint16,							intport,
									uint32,							extaddr, 
									uint16,							extport,
									std::string,					extaddrEx)

	// 某app主动请求look。
Esempio n. 5
0
// common include	
#if defined(BOTS)
#include "bots.hpp"
#endif
#include "bots_interface_macros.hpp"
#include "network/interface_defs.hpp"
#include "client_lib/common.hpp"

//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	BASEAPPMGR所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(BotsInterface)
NETWORK_INTERFACE_DECLARE_END()

#ifdef DEFINE_IN_INTERFACE
	#undef DEFINE_IN_INTERFACE
#endif

}
#endif
Esempio n. 6
0
#endif
#include "machine_interface_macros.hpp"
#include "network/interface_defs.hpp"
//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	machine所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(MachineInterface)
	// 其他组件向app广播自己的接口地址
	MACHINE_MESSAGE_DECLARE_ARGS9(onBroadcastInterface,				MERCURY_VARIABLE_MESSAGE,
									int32,							uid, 
									std::string,					username,
									int8,							componentType, 
									uint64,							componentID, 
									uint64,							componentIDEx, 
									uint32,							intaddr, 
									uint16,							intport,
									uint32,							extaddr, 
									uint16,							extport)
	
	// 其他组件向app请求获取某个组件类别的地址
	MACHINE_MESSAGE_DECLARE_ARGS7(onFindInterfaceAddr,				MERCURY_VARIABLE_MESSAGE,
									int32,							uid, 
#include "loginapp_interface_macros.hpp"
#include "network/interface_defs.hpp"
#include "server/server_errors.hpp"
//#define NDEBUG
// windows include	
#if KBE_PLATFORM == PLATFORM_WIN32
#else
// linux include
#endif
	
namespace KBEngine{

/**
	LOGINAPP所有消息接口在此定义
*/
NETWORK_INTERFACE_DECLARE_BEGIN(LoginappInterface)
	// 某app主动请求断线。
	LOGINAPP_MESSAGE_DECLARE_ARGS0(reqClose,										MERCURY_FIXED_MESSAGE)

	// 某app主动请求look。
	LOGINAPP_MESSAGE_DECLARE_ARGS0(lookApp,											MERCURY_FIXED_MESSAGE)

	// 请求创建账号
	LOGINAPP_MESSAGE_DECLARE_ARGS2(reqCreateAccount,								MERCURY_VARIABLE_MESSAGE,
									std::string,									accountName,
									std::string,									password)

	// 用户登录服务器 
	LOGINAPP_MESSAGE_DECLARE_STREAM(login,											MERCURY_VARIABLE_MESSAGE)

	// 某app请求获取一个entityID段的回调