本文整理汇总了C++中CImPdu::SetSeqNum方法的典型用法代码示例。如果您正苦于以下问题:C++ CImPdu::SetSeqNum方法的具体用法?C++ CImPdu::SetSeqNum怎么用?C++ CImPdu::SetSeqNum使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CImPdu
的用法示例。
在下文中一共展示了CImPdu::SetSeqNum方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getNormalGroupList
/**
* 获取正式群列表
*
* @param pPdu 收到的packet包指针
* @param conn_uuid 该包过来的socket 描述符
*/
void getNormalGroupList(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Group::IMNormalGroupListReq msg;
IM::Group::IMNormalGroupListRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
CImPdu* pPduRes = new CImPdu;
uint32_t nUserId = msg.user_id();
list<IM::BaseDefine::GroupVersionInfo> lsGroup;
CGroupModel::getInstance()->getUserGroup(nUserId, lsGroup, IM::BaseDefine::GROUP_TYPE_NORMAL);
msgResp.set_user_id(nUserId);
for(auto it=lsGroup.begin(); it!=lsGroup.end(); ++it)
{
IM::BaseDefine::GroupVersionInfo* pGroupVersion = msgResp.add_group_version_list();
pGroupVersion->set_group_id(it->group_id());
pGroupVersion->set_version(it->version());
}
log("getNormalGroupList. userId=%u, count=%d", nUserId, msgResp.group_version_list_size());
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_GROUP);
pPduRes->SetCommandId(IM::BaseDefine::CID_GROUP_NORMAL_LIST_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("parse pb failed");
}
}
示例2: _HandleStatusNotify
// friend online/off-line notify
void CRouteServConn::_HandleStatusNotify(CImPdu* pPdu)
{
IM::Buddy::IMUserStatNotify msg;
CHECK_PB_PARSE_MSG(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()));
IM::BaseDefine::UserStat user_stat = msg.user_stat();
log("HandleFriendStatusNotify, user_id=%u, status=%u ", user_stat.user_id(), user_stat.status());
// send friend online message to client
//CImUserManager::GetInstance()->BroadcastPdu(pPdu, CLIENT_TYPE_FLAG_PC);
//send to db
CDBServConn* pDBConn = get_db_serv_conn();
//CImUser* pImUser = CImUserManager::GetInstance()->GetImUserById( user_stat.user_id());
if(pDBConn) //pImUser &&
{
IM::Server::IMGetFriendsidReq msgReq;
msgReq.set_user_id(user_stat.user_id());
CImPdu dbPdu;
//CDbAttachData dbAttachData(pPdu->GetBodyData(), pPdu->GetBodyLength());
//msgReq.set_attach_data(dbAttachData.GetBuffer(), dbAttachData.GetLength());
msgReq.set_attach_data(pPdu->GetBodyData(), pPdu->GetBodyLength());
dbPdu.SetPBMsg( &msgReq);
dbPdu.SetServiceId(DFFX_SID_OTHER);
dbPdu.SetCommandId(DFFX_CID_OTHER_GETFRIENDSID_REQ);
dbPdu.SetSeqNum(pPdu->GetSeqNum());
pDBConn->SendPdu( &dbPdu);
}
}
示例3: HandleClientGroupInfoRequest
void CGroupChat::HandleClientGroupInfoRequest(CImPdu *pPdu, CMsgConn* pFromConn)
{
IM::Group::IMGroupInfoListReq msg;
CHECK_PB_PARSE_MSG(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()));
uint32_t user_id = pFromConn->GetUserId();
uint32_t group_cnt = msg.group_version_list_size();
log("HandleClientGroupInfoRequest, user_id=%u, group_cnt=%u. ", user_id, group_cnt);
CPduAttachData attach_data(ATTACH_TYPE_HANDLE, pFromConn->GetHandle(), 0, NULL);
CDBServConn* pDBConn = get_db_serv_conn();
if (pDBConn)
{
msg.set_user_id(user_id);
msg.set_attach_data(attach_data.GetBuffer(), attach_data.GetLength());
pPdu->SetPBMsg(&msg);
pDBConn->SendPdu(pPdu);
}
else
{
log("no db connection. ");
IM::Group::IMGroupInfoListRsp msg2;
msg2.set_user_id(user_id);
CImPdu pdu;
pdu.SetPBMsg(&msg2);
pdu.SetServiceId(SID_GROUP);
pdu.SetCommandId(CID_GROUP_INFO_RESPONSE);
pdu.SetSeqNum(pPdu->GetSeqNum());
pFromConn->SendPdu(&pdu);
}
}
示例4: HandleClientGroupChangeMemberRequest
void CGroupChat::HandleClientGroupChangeMemberRequest(CImPdu* pPdu, CMsgConn* pFromConn)
{
IM::Group::IMGroupChangeMemberReq msg;
CHECK_PB_PARSE_MSG(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()));
uint32_t change_type = msg.change_type();
uint32_t req_user_id = pFromConn->GetUserId();
uint32_t group_id = msg.group_id();
uint32_t user_cnt = msg.member_id_list_size();
log("HandleClientChangeMemberReq, change_type=%u, req_id=%u, group_id=%u, user_cnt=%u ",
change_type, req_user_id, group_id, user_cnt);
CDBServConn* pDbConn = get_db_serv_conn();
if (pDbConn) {
CDbAttachData attach_data(ATTACH_TYPE_HANDLE, pFromConn->GetHandle(), 0);
msg.set_user_id(req_user_id);
msg.set_attach_data(attach_data.GetBuffer(), attach_data.GetLength());
pPdu->SetPBMsg(&msg);
pDbConn->SendPdu(pPdu);
} else {
log("no DB connection ");
IM::Group::IMGroupChangeMemberRsp msg2;
msg2.set_user_id(req_user_id);
msg2.set_change_type((IM::BaseDefine::GroupModifyType)change_type);
msg2.set_result_code(1);
msg2.set_group_id(group_id);
CImPdu pdu;
pdu.SetPBMsg(&msg2);
pdu.SetServiceId(SID_GROUP);
pdu.SetCommandId(CID_GROUP_CHANGE_MEMBER_RESPONSE);
pdu.SetSeqNum(pPdu->GetSeqNum());
pFromConn->SendPdu(&pdu);
}
}
示例5: HandleClientGroupShieldGroupRequest
void CGroupChat::HandleClientGroupShieldGroupRequest(CImPdu *pPdu, CMsgConn *pFromConn)
{
IM::Group::IMGroupShieldReq msg;
CHECK_PB_PARSE_MSG(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()));
uint32_t shield_status = msg.shield_status();
uint32_t group_id = msg.group_id();
uint32_t user_id = pFromConn->GetUserId();
log("HandleClientGroupShieldGroupRequest, user_id: %u, group_id: %u, shield_status: %u. ",
user_id, group_id, shield_status);
CDBServConn* pDbConn = get_db_serv_conn();
if (pDbConn) {
CDbAttachData attach_data(ATTACH_TYPE_HANDLE, pFromConn->GetHandle(), 0);
msg.set_user_id(user_id);
msg.set_attach_data(attach_data.GetBuffer(), attach_data.GetLength());
pPdu->SetPBMsg(&msg);
pDbConn->SendPdu(pPdu);
} else {
log("no DB connection ");
IM::Group::IMGroupShieldRsp msg2;
msg2.set_user_id(user_id);
msg2.set_result_code(1);
CImPdu pdu;
pdu.SetPBMsg(&msg2);
pdu.SetServiceId(SID_GROUP);
pdu.SetCommandId(CID_GROUP_SHIELD_GROUP_RESPONSE);
pdu.SetSeqNum(pPdu->GetSeqNum());
pFromConn->SendPdu(&pdu);
}
}
示例6: createGroup
/**
* 创建群组
*
* @param pPdu 收到的packet包指针
* @param conn_uuid 该包过来的socket 描述符
*/
void createGroup(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Group::IMGroupCreateReq msg;
IM::Group::IMGroupCreateRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
CImPdu* pPduRes = new CImPdu;
uint32_t nUserId = msg.user_id();
string strGroupName = msg.group_name();
IM::BaseDefine::GroupType nGroupType = msg.group_type();
if(IM::BaseDefine::GroupType_IsValid(nGroupType))
{
string strGroupAvatar = msg.group_avatar();
set<uint32_t> setMember;
uint32_t nMemberCnt = msg.member_id_list_size();
for(uint32_t i=0; i<nMemberCnt; ++i)
{
uint32_t nUserId = msg.member_id_list(i);
setMember.insert(nUserId);
}
log("createGroup.%d create %s, userCnt=%u", nUserId, strGroupName.c_str(), setMember.size());
uint32_t nGroupId = CGroupModel::getInstance()->createGroup(nUserId, strGroupName, strGroupAvatar, nGroupType, setMember);
msgResp.set_user_id(nUserId);
msgResp.set_group_name(strGroupName);
for(auto it=setMember.begin(); it!=setMember.end();++it)
{
msgResp.add_user_id_list(*it);
}
if(nGroupId != INVALID_VALUE)
{
msgResp.set_result_code(0);
msgResp.set_group_id(nGroupId);
}
else
{
msgResp.set_result_code(1);
}
log("createGroup.%d create %s, userCnt=%u, result:%d", nUserId, strGroupName.c_str(), setMember.size(), msgResp.result_code());
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_GROUP);
pPduRes->SetCommandId(IM::BaseDefine::CID_GROUP_CREATE_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("invalid group type.userId=%u, groupType=%u, groupName=%s", nUserId, nGroupType, strGroupName.c_str());
}
}
else
{
log("parse pb failed");
}
}
示例7: HandleClientGroupNormalRequest
void CGroupChat::HandleClientGroupNormalRequest(CImPdu* pPdu, CMsgConn* pFromConn)
{
IM::Group::IMNormalGroupListReq msg;
CHECK_PB_PARSE_MSG(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()));
uint32_t user_id = pFromConn->GetUserId();
log("HandleClientGroupNormalRequest, user_id=%u. ", user_id);
CDbAttachData attach_data(ATTACH_TYPE_HANDLE, pFromConn->GetHandle(), 0);
CDBServConn* pDBConn = get_db_serv_conn();
if (pDBConn)
{
msg.set_user_id(user_id);
msg.set_attach_data((uchar_t*)attach_data.GetBuffer(), attach_data.GetLength());
pPdu->SetPBMsg(&msg);
pDBConn->SendPdu(pPdu);
}
else
{
log("no db connection. ");
IM::Group::IMNormalGroupListRsp msg2;
msg.set_user_id(user_id);
CImPdu pdu;
pdu.SetPBMsg(&msg2);
pdu.SetServiceId(SID_GROUP);
pdu.SetCommandId(CID_GROUP_NORMAL_LIST_RESPONSE);
pdu.SetSeqNum(pPdu->GetSeqNum());
pFromConn->SendPdu(&pdu);
}
}
示例8: modifyMember
/**
* 修改群成员,增加或删除
*
* @param pPdu 收到的packet包指针
* @param conn_uuid 该包过来的socket 描述符
*/
void modifyMember(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Group::IMGroupChangeMemberReq msg;
IM::Group::IMGroupChangeMemberRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
uint32_t nUserId = msg.user_id();
uint32_t nGroupId = msg.group_id();
IM::BaseDefine::GroupModifyType nType = msg.change_type();
if (IM::BaseDefine::GroupModifyType_IsValid(nType) &&
CGroupModel::getInstance()->isValidateGroupId(nGroupId)) {
CImPdu* pPduRes = new CImPdu;
uint32_t nCnt = msg.member_id_list_size();
set<uint32_t> setUserId;
for(uint32_t i=0; i<nCnt;++i)
{
setUserId.insert(msg.member_id_list(i));
}
list<uint32_t> lsCurUserId;
bool bRet = CGroupModel::getInstance()->modifyGroupMember(nUserId, nGroupId, nType, setUserId, lsCurUserId);
msgResp.set_user_id(nUserId);
msgResp.set_group_id(nGroupId);
msgResp.set_change_type(nType);
msgResp.set_result_code(bRet?0:1);
if(bRet)
{
for(auto it=setUserId.begin(); it!=setUserId.end(); ++it)
{
msgResp.add_chg_user_id_list(*it);
}
for(auto it=lsCurUserId.begin(); it!=lsCurUserId.end(); ++it)
{
msgResp.add_cur_user_id_list(*it);
}
}
log("userId=%u, groupId=%u, result=%u, changeCount:%u, currentCount=%u",nUserId, nGroupId, bRet?0:1, msgResp.chg_user_id_list_size(), msgResp.cur_user_id_list_size());
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_GROUP);
pPduRes->SetCommandId(IM::BaseDefine::CID_GROUP_CHANGE_MEMBER_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("invalid groupModifyType or groupId. userId=%u, groupId=%u, groupModifyType=%u", nUserId, nGroupId, nType);
}
}
else
{
log("parse pb failed");
}
}
示例9: getGroupInfo
/**
* 获取群信息
*
* @param pPdu 收到的packet包指针
* @param conn_uuid 该包过来的socket 描述符
*/
void getGroupInfo(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Group::IMGroupInfoListReq msg;
IM::Group::IMGroupInfoListRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
CImPdu* pPduRes = new CImPdu;
uint32_t nUserId = msg.user_id();
uint32_t nGroupCnt = msg.group_version_list_size();
map<uint32_t, IM::BaseDefine::GroupVersionInfo> mapGroupId;
for(uint32_t i=0; i<nGroupCnt; ++i)
{
IM::BaseDefine::GroupVersionInfo groupInfo = msg.group_version_list(i);
if(CGroupModel::getInstance()->isValidateGroupId(groupInfo.group_id()))
{
mapGroupId[groupInfo.group_id()] = groupInfo;
}
}
list<IM::BaseDefine::GroupInfo> lsGroupInfo;
CGroupModel::getInstance()->getGroupInfo(mapGroupId, lsGroupInfo);
msgResp.set_user_id(nUserId);
for(auto it=lsGroupInfo.begin(); it!=lsGroupInfo.end(); ++it)
{
IM::BaseDefine::GroupInfo* pGroupInfo = msgResp.add_group_info_list();
// *pGroupInfo = *it;
pGroupInfo->set_group_id(it->group_id());
pGroupInfo->set_version(it->version());
pGroupInfo->set_group_name(it->group_name());
pGroupInfo->set_group_avatar(it->group_avatar());
pGroupInfo->set_group_creator_id(it->group_creator_id());
pGroupInfo->set_group_type(it->group_type());
pGroupInfo->set_shield_status(it->shield_status());
uint32_t nGroupMemberCnt = it->group_member_list_size();
for (uint32_t i=0; i<nGroupMemberCnt; ++i)
{
uint32_t userId = it->group_member_list(i);
pGroupInfo->add_group_member_list(userId);
}
}
log("userId=%u, requestCount=%u", nUserId, nGroupCnt);
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_GROUP);
pPduRes->SetCommandId(IM::BaseDefine::CID_GROUP_INFO_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("parse pb failed");
}
}
示例10: getChangedUser
void getChangedUser(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Buddy::IMAllUserReq msg;
IM::Buddy::IMAllUserRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
CImPdu* pPduRes = new CImPdu;
uint32_t nReqId = msg.user_id();
uint32_t nLastTime = msg.latest_update_time();
uint32_t nLastUpdate = CSyncCenter::getInstance()->getLastUpdate();
list<IM::BaseDefine::UserInfo> lsUsers;
if( nLastUpdate > nLastTime)
{
list<uint32_t> lsIds;
CUserModel::getInstance()->getChangedId(nLastTime, lsIds);
CUserModel::getInstance()->getUsers(lsIds, lsUsers);
}
msgResp.set_user_id(nReqId);
msgResp.set_latest_update_time(nLastTime);
for (list<IM::BaseDefine::UserInfo>::iterator it=lsUsers.begin();
it!=lsUsers.end(); ++it)
{
IM::BaseDefine::UserInfo* pUser = msgResp.add_user_list();
// *pUser = *it;
pUser->set_user_id(it->user_id());
pUser->set_user_gender(it->user_gender());
pUser->set_user_nick_name(it->user_nick_name());
pUser->set_avatar_url(it->avatar_url());
pUser->set_sign_info(it->sign_info());
pUser->set_department_id(it->department_id());
pUser->set_email(it->email());
pUser->set_user_real_name(it->user_real_name());
pUser->set_user_tel(it->user_tel());
pUser->set_user_domain(it->user_domain());
pUser->set_status(it->status());
}
log("userId=%u,nLastUpdate=%u, last_time=%u, userCnt=%u", nReqId,nLastUpdate,
nLastTime, msgResp.user_list_size());
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_BUDDY_LIST);
pPduRes->SetCommandId(IM::BaseDefine::CID_BUDDY_LIST_ALL_USER_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("parse pb failed");
}
}
示例11: getUnreadMsgCnt
uint32_t ClientConn::getUnreadMsgCnt(uint32_t nUserId)
{
CImPdu cPdu;
IM::Message::IMUnreadMsgCntReq msg;
msg.set_user_id(nUserId);
cPdu.SetPBMsg(&msg);
cPdu.SetServiceId(IM::BaseDefine::SID_MSG);
cPdu.SetCommandId(IM::BaseDefine::CID_MSG_UNREAD_CNT_REQUEST);
uint32_t nSeqNo = m_pSeqAlloctor->getSeq(ALLOCTOR_PACKET);
cPdu.SetSeqNum(nSeqNo);
SendPdu(&cPdu);
return nSeqNo;
}
示例12: getUser
uint32_t ClientConn::getUser(uint32_t nUserId, uint32_t nTime)
{
CImPdu cPdu;
IM::Buddy::IMAllUserReq msg;
msg.set_user_id(nUserId);
msg.set_latest_update_time(nTime);
cPdu.SetPBMsg(&msg);
cPdu.SetServiceId(IM::BaseDefine::SID_BUDDY_LIST);
cPdu.SetCommandId(IM::BaseDefine::CID_BUDDY_LIST_ALL_USER_REQUEST);
uint32_t nSeqNo = m_pSeqAlloctor->getSeq(ALLOCTOR_PACKET);
cPdu.SetSeqNum(nSeqNo);
SendPdu(&cPdu);
return nSeqNo;
}
示例13: getUserInfo
void getUserInfo(CImPdu* pPdu, uint32_t conn_uuid)
{
IM::Buddy::IMUsersInfoReq msg;
IM::Buddy::IMUsersInfoRsp msgResp;
if(msg.ParseFromArray(pPdu->GetBodyData(), pPdu->GetBodyLength()))
{
CImPdu* pPduRes = new CImPdu;
uint32_t from_user_id = msg.user_id();
uint32_t userCount = msg.user_id_list_size();
std::list<uint32_t> idList;
for(uint32_t i = 0; i < userCount;++i) {
idList.push_back(msg.user_id_list(i));
}
std::list<IM::BaseDefine::UserInfo> lsUser;
CUserModel::getInstance()->getUsers(idList, lsUser);
msgResp.set_user_id(from_user_id);
for(list<IM::BaseDefine::UserInfo>::iterator it=lsUser.begin();
it!=lsUser.end(); ++it)
{
IM::BaseDefine::UserInfo* pUser = msgResp.add_user_info_list();
// *pUser = *it;
pUser->set_user_id(it->user_id());
pUser->set_user_gender(it->user_gender());
pUser->set_user_nick_name(it->user_nick_name());
pUser->set_avatar_url(it->avatar_url());
pUser->set_sign_info(it->sign_info());
pUser->set_department_id(it->department_id());
pUser->set_email(it->email());
pUser->set_user_real_name(it->user_real_name());
pUser->set_user_tel(it->user_tel());
pUser->set_user_domain(it->user_domain());
pUser->set_status(it->status());
pUser->set_user_type(it->user_type());
}
log("userId=%u, userCnt=%u", from_user_id, userCount);
msgResp.set_attach_data(msg.attach_data());
pPduRes->SetPBMsg(&msgResp);
pPduRes->SetSeqNum(pPdu->GetSeqNum());
pPduRes->SetServiceId(IM::BaseDefine::SID_BUDDY_LIST);
pPduRes->SetCommandId(IM::BaseDefine::CID_BUDDY_LIST_USER_INFO_RESPONSE);
CProxyConn::AddResponsePdu(conn_uuid, pPduRes);
}
else
{
log("parse pb failed");
}
}
示例14: getRecentSession
uint32_t ClientConn::getRecentSession(uint32_t nUserId, uint32_t nLastTime)
{
CImPdu cPdu;
IM::Buddy::IMRecentContactSessionReq msg;
msg.set_user_id(nUserId);
msg.set_latest_update_time(nLastTime);
cPdu.SetPBMsg(&msg);
cPdu.SetServiceId(IM::BaseDefine::SID_BUDDY_LIST);
cPdu.SetCommandId(IM::BaseDefine::CID_BUDDY_LIST_RECENT_CONTACT_SESSION_REQUEST);
uint32_t nSeqNo = m_pSeqAlloctor->getSeq(ALLOCTOR_PACKET);
cPdu.SetSeqNum(nSeqNo);
SendPdu(&cPdu);
return nSeqNo;
}
示例15: getGroupList
uint32_t ClientConn::getGroupList(uint32_t nUserId)
{
CImPdu cPdu;
IM::Group::IMNormalGroupListReq msg;
msg.set_user_id(nUserId);
printf("%d\n" , nUserId);
cPdu.SetPBMsg(&msg);
cPdu.SetServiceId(IM::BaseDefine::SID_GROUP);
cPdu.SetCommandId(IM::BaseDefine::CID_GROUP_NORMAL_LIST_REQUEST);
uint32_t nSeqNo = m_pSeqAlloctor->getSeq(ALLOCTOR_PACKET);
cPdu.SetSeqNum(nSeqNo);
SendPdu(&cPdu);
return nSeqNo;
}