コード例 #1
0
void ICQClient::packInfoList(const ExtInfoList &infoList)
{
    char n = infoList.size();
    writeBuffer << n;
    for (ConfigPtrList::const_iterator it = infoList.begin(); it != infoList.end(); ++it){
        ExtInfo *info = static_cast<ExtInfo*>(*it);
        string spec = info->Specific;
        toServer(spec);
        writeBuffer << htons(info->Category()) << spec;
    }
}
コード例 #2
0
void ICQClientPrivate::packInfoList(const ExtInfoList &infoList)
{
    char n = infoList.size();
    sock->writeBuffer << n;
    for (ExtInfoList::const_iterator it = infoList.begin(); it != infoList.end(); ++it){
        ExtInfo *info = static_cast<ExtInfo*>(*it);
        string spec = info->Specific;
        client->toServer(spec, client->owner);
        sock->writeBuffer.pack(info->Category);
        sock->writeBuffer << spec;
    }
}