/// <summary> /// 链接LS成功后 登入流程 开启 /// </summary> public static void SendLoginMsgCL2LS() { ProtoMsg.MsgCl2lgRegist requestRegist = new ProtoMsg.MsgCl2lgRegist(); MsgRegServerInfo info = new MsgRegServerInfo(); MsgNetAddress andress = new MsgNetAddress(); andress.u32Port = 0; andress.u32Ip = 0; info.uType = 1; info.uServerId = 0; info.netAddr = andress; requestRegist.Info = info; Communicate.Send2GS(eMsgTypes.MsgCl2lgRegist, protobufM.Serializerobject <ProtoMsg.MsgCl2lgRegist>(requestRegist)); ProtoMsg.MsgCl2lgLogin requestLogin = new ProtoMsg.MsgCl2lgLogin(); requestLogin.strWebSession = "testtest"; requestLogin.strAccount = "6685"; Communicate.Send2GS(eMsgTypes.MsgCl2lgLogin, protobufM.Serializerobject <ProtoMsg.MsgCl2lgLogin>(requestLogin)); }
/// <summary> /// 链接LS成功后 登入流程 开启 /// </summary> public static void SendGSMsgCL2GS() { ProtoMsg.MsgCl2gsRegist requestRegist = new ProtoMsg.MsgCl2gsRegist(); MsgRegServerInfo info = new MsgRegServerInfo(); MsgNetAddress andress = new MsgNetAddress(); andress.u32Port = 0; andress.u32Ip = 0; info.uType = 1; info.uServerId = 0; info.netAddr = andress; requestRegist.Info = info; Communicate.Send2GS(eMsgTypes.MsgCl2gsRegist, protobufM.Serializerobject <ProtoMsg.MsgCl2gsRegist>(requestRegist)); ProtoMsg.MsgCl2gsLogin requestLogin = new ProtoMsg.MsgCl2gsLogin(); requestLogin.u64UUID = g_LSLogin.u64UUID; requestLogin.strLoginSession = g_LSLogin.strLoginSession; requestLogin.strAccount = g_LSLogin.u64UUID.ToString(); Communicate.Send2GS(eMsgTypes.MsgCl2gsLogin, protobufM.Serializerobject <ProtoMsg.MsgCl2gsLogin>(requestLogin)); }
/// <summary> /// 心跳包 /// </summary> public static void SendKeepLiveMsg() { ProtoMsg.MsgClientKeepLiveAck requestKeepLive = new ProtoMsg.MsgClientKeepLiveAck(); Communicate.Send2GS(eMsgTypes.MsgClientKeepLiveAck, protobufM.Serializerobject <ProtoMsg.MsgClientKeepLiveAck>(requestKeepLive)); }