本文整理汇总了C++中common::Stream::get_vint64方法的典型用法代码示例。如果您正苦于以下问题:C++ Stream::get_vint64方法的具体用法?C++ Stream::get_vint64怎么用?C++ Stream::get_vint64使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类common::Stream
的用法示例。
在下文中一共展示了Stream::get_vint64方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: deserialize
//block_id, server_count, server_id1, server_id2, ..., filename_len, filename
int SetBlockInfoMessage::deserialize(common::Stream& input)
{
int32_t iret = input.get_int32(reinterpret_cast<int32_t*> (&block_id_));
if (common::TFS_SUCCESS == iret)
{
iret = input.get_vint64(ds_);
}
if (common::TFS_SUCCESS == iret)
{
common::BasePacket::parse_special_ds(ds_, version_, lease_id_);
}
return iret;
}
示例2: deserialize
int MasterAndSlaveHeartResponseMessage::deserialize(common::Stream& input)
{
int64_t pos = 0;
int32_t iret = ns_identity_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == iret)
{
input.drain(ns_identity_.length());
if (ns_identity_.flags_ == HEART_GET_DATASERVER_LIST_FLAGS_YES)
{
iret = input.get_vint64(ds_list_);
}
}
return iret;
}
示例3: deserialize
int NsRequestCompactBlockMessage::deserialize(common::Stream& input)
{
int32_t ret = input.get_int32( reinterpret_cast<int32_t*> (&block_id_));
if (common::TFS_SUCCESS == ret)
{
ret = input.get_vint64(servers_);
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int64(&seqno_);
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_int32(&expire_time_);
}
return ret;
}
示例4: deserialize
int WriteDataMessage::deserialize(common::Stream& input)
{
int64_t pos = 0;
int32_t iret = write_data_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == iret)
{
input.drain( write_data_info_.length());
iret = input.get_vint64(ds_);
}
if (common::TFS_SUCCESS == iret
&& write_data_info_.length_ > 0)
{
data_ = input.get_data();
input.drain(write_data_info_.length_);
}
if (common::TFS_SUCCESS == iret)
{
parse_special_ds(ds_, version_, lease_id_);
}
return iret;
}
示例5: deserialize
int UnlinkFileMessage::deserialize(common::Stream& input)
{
int64_t pos = 0;
int32_t ret = unlink_file_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(unlink_file_info_.length());
}
if (common::TFS_SUCCESS == ret)
{
ret = input.get_vint64(dataservers_);
}
if (common::TFS_SUCCESS == ret)
{
input.get_int32(&option_flag_);
}
if (common::TFS_SUCCESS == ret)
{
BasePacket::parse_special_ds(dataservers_, version_, lease_id_);
}
if ((common::TFS_SUCCESS == ret) && input.get_data_length() > 0)
{
ret = input.get_int64(reinterpret_cast<int64_t*>(&lease_id_ext_));
}
if (common::TFS_SUCCESS == ret && input.get_data_length() > 0)
{
int64_t pos = 0;
ret = family_info_.deserialize(input.get_data(), input.get_data_length(), pos);
if (common::TFS_SUCCESS == ret)
{
input.drain(family_info_.length());
}
}
return ret;
}
示例6: deserialize
int CheckBlockResponseMessage::deserialize(common::Stream& input)
{
return input.get_vint64(blocks_);
}