本文整理汇总了C++中boost::system::error_code::clear方法的典型用法代码示例。如果您正苦于以下问题:C++ error_code::clear方法的具体用法?C++ error_code::clear怎么用?C++ error_code::clear使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类boost::system::error_code
的用法示例。
在下文中一共展示了error_code::clear方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getladdrs
inline int getladdrs(socket_type s, socket_addr_type** addrs,
boost::system::error_code& ec)
{
ec.clear();
int result = error_wrapper(call_getladdrs(
&msghdr::msg_namelen, s, addrs), ec);
#if defined(BOOST_WINDOWS)
if (result == 0)
ec.clear();
#endif
return result;
}
示例2: bind_remove
inline int bind_remove(socket_type s, const socket_addr_type* addr,
std::size_t addrlen, boost::system::error_code& ec)
{
ec.clear();
int result = error_wrapper(call_bind_remove(
&msghdr::msg_namelen, s, addr, addrlen), ec);
#if defined(BOOST_WINDOWS)
if (result == 0)
ec.clear();
#endif
return result;
}
示例3:
inline boost::filesystem::path symbol_location(const T& symbol, boost::system::error_code& ec) {
ec.clear();
return boost::dll::symbol_location_ptr(
boost::dll::detail::aggressive_ptr_cast<const void*>(boost::addressof(symbol)),
ec
);
}
示例4: write
size_t DropSink::write(
Sample const & sample,
boost::system::error_code & ec)
{
ec.clear();
return sample.size;
}
示例5: write
std::size_t message::write(std::ostream& out,
boost::system::error_code& ec, bool headers_only)
{
// reset error_code
ec.clear();
// initialize write buffers for send operation using HTTP headers
write_buffers_t write_buffers;
prepare_buffers_for_send(write_buffers, true, false);
// append payload content to write buffers (if there is any)
if (!headers_only && get_content_length() > 0 && get_content() != NULL)
write_buffers.push_back(boost::asio::buffer(get_content(), get_content_length()));
// write message to the output stream
std::size_t bytes_out = 0;
for (write_buffers_t::const_iterator i=write_buffers.begin(); i!=write_buffers.end(); ++i) {
const char *ptr = boost::asio::buffer_cast<const char*>(*i);
size_t len = boost::asio::buffer_size(*i);
out.write(ptr, len);
bytes_out += len;
}
return bytes_out;
}
示例6: get_basic_info
bool PptvMedia::get_basic_info(
ppbox::data::MediaBasicInfo & info,
boost::system::error_code & ec) const
{
info = parsed_video_;
ec.clear();
return true;
}
示例7: get_url
bool PptvMedia::get_url(
framework::string::Url & url,
boost::system::error_code & ec) const
{
url = url_;
ec.clear();
return true;
}
示例8: do_get_stream_status
void MergeDispatcher::do_get_stream_status(
StreamStatus & info,
boost::system::error_code & ec)
{
LOG_DEBUG("[do_get_stream_status]");
merger_->stream_status(info);
ec.clear();
}
示例9:
boost::system::error_code Connector::close(
boost::system::error_code & ec)
{
started_ = false;
ec.clear();
canceled_ = false;
return ec;
}
示例10: expires_at
std::size_t high_resolution_timer::expires_at(const high_resolution_timer::time_type& expiry_time, boost::system::error_code& ec)
{
ec.clear();
std::size_t ret = cancel(ec);
m_expiration_time = expiry_time;
m_expired = false;
m_io_service.add_timer(this);
return ret;
}
示例11: get_media_info
bool MergeDispatcher::get_media_info(
MediaInfo & info,
boost::system::error_code & ec)
{
LOG_DEBUG("[get_media_info]");
merger_->media_info(info);
ec.clear();
return true;
}
示例12: get_stream_info
bool MergeDispatcher::get_stream_info(
std::vector<StreamInfo> & streams,
boost::system::error_code & ec)
{
LOG_DEBUG("[get_stream_info]");
merger_->stream_info(streams);
ec.clear();
return true;
}
示例13: do_setup
void MergeDispatcher::do_setup(
boost::uint32_t index,
boost::system::error_code & ec)
{
LOG_DEBUG("[do_setup]");
//muxer_->setup(index, ec);
assert(index == (boost::uint32_t)-1);
ec.clear();
}
示例14: create_pipe
inline pipe create_pipe(boost::system::error_code &ec)
{
HANDLE handles[2];
if (!::CreatePipe(&handles[0], &handles[1], NULL, 0))
BOOST_PROCESS_RETURN_LAST_SYSTEM_ERROR(ec);
else
ec.clear();
return make_pipe(handles[0], handles[1]);
}
示例15: expires_from_now
std::size_t high_resolution_timer::expires_from_now(const duration_type& expiry_time
, boost::system::error_code& ec)
{
ec.clear();
std::size_t ret = cancel(ec);
m_expiration_time = chrono::high_resolution_clock::now() + expiry_time;
m_expired = false;
m_io_service.add_timer(this);
return ret;
}