当前位置: 首页>>代码示例>>C++>>正文


C++ error_code::clear方法代码示例

本文整理汇总了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;
}
开发者ID:azat-archive,项目名称:boostasiosctp,代码行数:12,代码来源:sctp_socket_ops.hpp

示例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;
}
开发者ID:azat-archive,项目名称:boostasiosctp,代码行数:12,代码来源:sctp_socket_ops.hpp

示例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
     );
 }
开发者ID:ASMlover,项目名称:study,代码行数:7,代码来源:runtime_symbol_info.hpp

示例4: write

 size_t DropSink::write(
     Sample const & sample, 
     boost::system::error_code & ec)
 {
     ec.clear();
     return sample.size;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:7,代码来源:DropSink.cpp

示例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;
}
开发者ID:aspectron,项目名称:jsx,代码行数:25,代码来源:http_message.cpp

示例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;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:8,代码来源:PptvMedia.cpp

示例7: get_url

 bool PptvMedia::get_url(
     framework::string::Url & url,
     boost::system::error_code & ec) const
 {
     url = url_;
     ec.clear();
     return true;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:8,代码来源:PptvMedia.cpp

示例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();
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:8,代码来源:MergeDispatcher.cpp

示例9:

 boost::system::error_code Connector::close(
     boost::system::error_code & ec)
 {
     started_ = false;
     ec.clear();
     canceled_ = false;
     return ec;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:8,代码来源:Connector.cpp

示例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;
	}
开发者ID:arvidn,项目名称:libsimulator,代码行数:9,代码来源:high_resolution_timer.cpp

示例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;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:9,代码来源:MergeDispatcher.cpp

示例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;
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:9,代码来源:MergeDispatcher.cpp

示例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();
 }
开发者ID:huangyt,项目名称:MyProjects,代码行数:9,代码来源:MergeDispatcher.cpp

示例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]);
}
开发者ID:090809,项目名称:TrinityCore,代码行数:9,代码来源:create_pipe.hpp

示例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;
	}
开发者ID:arvidn,项目名称:libsimulator,代码行数:10,代码来源:high_resolution_timer.cpp


注:本文中的boost::system::error_code::clear方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。