You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #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;
- }
-
- }
|