如果您无法下载资料,请参考说明:
1、部分资料下载需要金币,请确保您的账户上有足够的金币
2、已购买过的文档,再次下载不重复扣费
3、资料包下载后请先用软件解压,在使用对应软件打开
usingSystem;usingSystem.Text;usingSystem.Runtime.InteropServices;namespaceANYCHATAPI{/**************************************************************************************AnyChatPlatformServerSDK**********************************************************************************/publicclassAnyChatServerSDK{publicconststringAnyChatServerSDKDll="AnyChatServerSDK.dll";//#defineBRAS_SERVERAPPMSG_CONNECTED1///<连接AnyChat服务器成功publicconstintBRAS_SERVERAPPMSG_CONNECTED=1;//#defineBRAS_SERVERAPPMSG_DISCONNECT2///<与AnyChat服务器断开连接publicconstintBRAS_SERVERAPPMSG_DISCONNECT=2;/***回调函数定义*///服务器应用程序消息回调函数定义//typedefvoid(CALLBACK*BRAS_OnServerAppMessage_CallBack)(DWORDdwMsg,LPVOIDlpUserValue);publicdelegatevoidOnServerAppMessageCallBack(intmsg,intuserValue);//SDK定时器回调函数定义(上层应用可以在该回调中处理定时任务,而不需要额外开启线程,或是定时器)//typedefvoid(CALLBACK*BRAS_OnTimerEvent_CallBack)(LPVOIDlpUserValue);publicdelegatevoidOnTimerEventCallBack(intuserValue);//用户身份验证回调函数定义//typedefDWORD(CALLBACK*BRAS_VerifyUser_CallBack)(INLPCTSTRlpUserName,INLPCTSTRlpPassword,OUTLPDWORDlpUserID,OUTLPDWORDlpUserLevel,OUTLPTSTRlpNickName,INDWORDdwNCLen,LPVOIDlpUserValue);publicdelegateintVerifyUserCallBack(stringuserName,stringpassword,refintuserID,refintuserLevel,IntPtrnickName,intlen,intuserValue);//用户申请进入房间回调函数定义//typedefDWORD(CALLBACK*BRAS_PrepareEnterRoom_CallBack)(DWORDdwUserId,DWORDdwRoomId,LPCTSTRlpRoomName,LPCTSTRlpPassword,LPVOIDlpUserValue);publicdelegateintPrepareEnterRoomCallBack(intuserId,introomId,stringroomName,stringpassword,intuserValue);//用户登录成功回调函数定义//typedefvoid(CALLBACK*BRAS_OnUserLoginAction_CallBack)(DWORDdwUserId,LPCTSTRszUserName,DWORDdwLevel,LPCTSTRszIpAddr,LPVOIDlpUserValue);publicdelegatevoidOnUserLoginActionCallBack(intuserId,stringuserName,intlevel,stringaddr,intuserValue);//用户注销回调函数定义//typedefvoid(CALLBACK*BRAS_OnUserLogoutAction_CallBack)(DWORDdwUserId,LPVOIDlpUserValue);publicdelegatevoidOnUserLogoutActionCallBack(intuserId,intuserV