源代码整体文件的抓图如下:
其中一个文件中的源代码演示:
#ifndef __client_h__
#define __client_h__
#include <list>
#ifdef WIN32
#define STDCALL __stdcall
#else
#define STDCALL
#endif
typedef struct {
char *appName;
char *gameList;
int (STDCALL *gameCallback)(char *game, int player, int numplayers);
void (STDCALL *chatReceivedCallback)(char *nick, char *text);
void (STDCALL *clientDroppedCallback)(char *nick, int playernb);
void (STDCALL *moreInfosCallback)(char *gamename);
} kailleraInfo;
struct kailleraGameInfo{
char name[64];
char client[64];
char owner[64];
char userInfo[16];
int id;
int status;
};
struct kailleraUserInfo{
char name[64];
int id;
int ping;
int connType;
int status;
};
struct kailleraServerInfo
{
char name[64];
char location[64];
char address[64];
char version[8];
char limit[8];
char games[8];
};
typedef std::list<kailleraGameInfo> GameInfoList;
typedef std::list<kailleraUserInfo> UserInfoList;
typedef std::list<kailleraServerInfo> ServerInfoList;
#define MSG_CODE(buff) ((unsigned char)buff[4])
#define MSG_SHORT(buff,pos) ((((int)((unsigned char)buff[pos+1])) << 8) + ((int)((unsigned char)buff[pos])))
#define MSG_INT(buff,pos) MSG_SHORT(buff,pos)
#define MSG_SERIAL(buff) MSG_SHORT(buff, 0)
#define MSG_LENGTH(buff) MSG_SHORT(buff, 2)
int CL_Init();
int CL_Shutdown();
int CL_Connect(const char *nickName, const char *address, int connType);
int CL_Disconnect();
int CL_Send(int code, const char *data, int dataLen);
int CL_SendV(int code, const char *fmt, ...);
int CL_Recv(void *buff, int len, int timeout = -1, int ms = 0);
int CL_QueueInput(void *buff, int len);
int CL_HasMore();
int CL_Dispatch(const void *buff, int len);
int CL_ChatSend(const char *text);
int CL_InGameChatSend(const char *text);
int CL_NewGame(const char *game);
int CL_JoinGame(int gameId);
int CL_LeaveGame();
int CL_Run();
int CL_QuitGame();
int CL_KeepAlive();
int CL_MessagePump();
int CL_GetSocketFD();
int CL_SetInfo(kailleraInfo *infos);
int CL_ModifyPlayValues(void *values, int size);
int CL_GetUserId();
const GameInfoList& CL_GetGameInfoList();
const UserInfoList& CL_GetUserInfoList();
int CL_ConnectStep0(const char *address);
int CL_ConnectStep1();
int CL_ConnectStep2(const char *nickName, int connType);
int CL_ConnectAck();
int CL_ConnectFinal();
int CL_GetConnSockFD();
int CL_QueryKaillera(ServerInfoList& svl);
const char *CL_GetError();
#endif
-----------------------------------------------------------
如果你了解kailleraclient.dll 多大用处的话 我想就不用我多说了!
我的联系方式:28342751