25'ten fazla konu seçemezsiniz
Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.
|
- #pragma once
-
- #include <chrono>
- #include <string>
- #include <memory>
- #include <cppamqp/types.h>
- #include <cppamqp/config.h>
- #include <cppamqp/connection.h>
- #include <cppamqp/channel.inl>
-
- namespace cppamqp
- {
-
- const std::string& connection::default_vhost()
- {
- static const std::string value("/");
- return value;
- }
-
- const std::string& connection::default_username()
- {
- static const std::string value("guest");
- return value;
- }
-
- const std::string& connection::default_password()
- {
- static const std::string value("guest");
- return value;
- }
-
- const std::chrono::milliseconds& connection::default_consume_timeout()
- {
- static const std::chrono::milliseconds value(-1);
- return value;
- }
-
- connection::operator bool() const
- { return static_cast<bool>(_internal); }
-
- amqp_connection_state_t& connection::handle()
- {
- if (!_internal)
- throw exception("connection is closed");
- return _internal->connection;
- }
-
- const amqp_connection_state_t& connection::handle() const
- {
- if (!_internal)
- throw exception("connection is closed");
- return _internal->connection;
- }
-
- }
|