worked on the file structure
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
#include "ConnectionHandler.hpp"
|
||||
#include <iostream>
|
||||
|
||||
void ConnectionHandler::onConnected(AMQP::TcpConnection *connection)
|
||||
{
|
||||
std::cout << "TCP CONNECTED\n";
|
||||
}
|
||||
|
||||
|
||||
void ConnectionHandler::onReady(AMQP::TcpConnection *connection)
|
||||
{
|
||||
std::cout << "AMQP READY\n";
|
||||
}
|
||||
|
||||
void ConnectionHandler::onError(AMQP::TcpConnection *connection, const char *message)
|
||||
{
|
||||
std::cerr << "AMQP error: " << message << std::endl;
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
#include <uv.h>
|
||||
#include <amqpcpp.h>
|
||||
#include <amqpcpp/libuv.h>
|
||||
|
||||
class ConnectionHandler : public AMQP::LibUvHandler {
|
||||
public:
|
||||
ConnectionHandler(uv_loop_t *loop)
|
||||
: AMQP::LibUvHandler(loop)
|
||||
{}
|
||||
|
||||
void onConnected(AMQP::TcpConnection *connection) override;
|
||||
|
||||
void onReady(AMQP::TcpConnection *connection) override;
|
||||
|
||||
void onError(AMQP::TcpConnection *connection, const char *message) override;
|
||||
|
||||
~ConnectionHandler() override = default;
|
||||
};
|
||||
Reference in New Issue
Block a user