added comments
This commit is contained in:
parent
ab603ce007
commit
976e948cb0
|
|
@ -5,7 +5,7 @@
|
||||||
* around a buffer of bytes
|
* around a buffer of bytes
|
||||||
*
|
*
|
||||||
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
|
* @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
|
||||||
* @copyright 2014 Copernica BV
|
* @copyright 2014 - 2018 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -114,7 +114,10 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual const char *data(size_t pos, size_t size) const override
|
virtual const char *data(size_t pos, size_t size) const override
|
||||||
{
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) size;
|
(void) size;
|
||||||
|
|
||||||
|
// expose the data
|
||||||
return _data + pos;
|
return _data + pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
* of methods that are called when data needs to be sent, or when the
|
* of methods that are called when data needs to be sent, or when the
|
||||||
* AMQP connection ends up in a broken state.
|
* AMQP connection ends up in a broken state.
|
||||||
*
|
*
|
||||||
* @copyright 2014 Copernica BV
|
* @copyright 2014 - 2018 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -62,9 +62,11 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual uint16_t onNegotiate(Connection *connection, uint16_t interval)
|
virtual uint16_t onNegotiate(Connection *connection, uint16_t interval)
|
||||||
{
|
{
|
||||||
// default implementation, disable heartbeats
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) connection;
|
(void) connection;
|
||||||
(void) interval;
|
(void) interval;
|
||||||
|
|
||||||
|
// default implementation, disable heartbeats
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -90,7 +92,11 @@ public:
|
||||||
*
|
*
|
||||||
* @param connection The connection over which the heartbeat was received
|
* @param connection The connection over which the heartbeat was received
|
||||||
*/
|
*/
|
||||||
virtual void onHeartbeat(Connection *connection) { (void) connection; }
|
virtual void onHeartbeat(Connection *connection)
|
||||||
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
|
(void) connection;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* When the connection ends up in an error state this method is called.
|
* When the connection ends up in an error state this method is called.
|
||||||
|
|
@ -108,6 +114,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual void onError(Connection *connection, const char *message)
|
virtual void onError(Connection *connection, const char *message)
|
||||||
{
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) connection;
|
(void) connection;
|
||||||
(void) message;
|
(void) message;
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +133,11 @@ public:
|
||||||
*
|
*
|
||||||
* @param connection The connection that can now be used
|
* @param connection The connection that can now be used
|
||||||
*/
|
*/
|
||||||
virtual void onConnected(Connection *connection) { (void) connection; }
|
virtual void onConnected(Connection *connection)
|
||||||
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
|
(void) connection;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method that is called when the connection was closed.
|
* Method that is called when the connection was closed.
|
||||||
|
|
@ -136,8 +147,11 @@ public:
|
||||||
*
|
*
|
||||||
* @param connection The connection that was closed and that is now unusable
|
* @param connection The connection that was closed and that is now unusable
|
||||||
*/
|
*/
|
||||||
virtual void onClosed(Connection *connection) { (void) connection; }
|
virtual void onClosed(Connection *connection)
|
||||||
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
|
(void) connection;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
* possibly happen in the future that can be
|
* possibly happen in the future that can be
|
||||||
* caught.
|
* caught.
|
||||||
*
|
*
|
||||||
* @copyright 2014 Copernica BV
|
* @copyright 2014 - 2018 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -97,10 +97,12 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name, uint32_t messagecount, uint32_t consumercount) const
|
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name, uint32_t messagecount, uint32_t consumercount) const
|
||||||
{
|
{
|
||||||
// this is the same as a regular success message
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) name;
|
(void) name;
|
||||||
(void) messagecount;
|
(void) messagecount;
|
||||||
(void) consumercount;
|
(void) consumercount;
|
||||||
|
|
||||||
|
// this is the same as a regular success message
|
||||||
return reportSuccess();
|
return reportSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -111,8 +113,10 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount) const
|
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount) const
|
||||||
{
|
{
|
||||||
// this is the same as a regular success message
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) messagecount;
|
(void) messagecount;
|
||||||
|
|
||||||
|
// this is the same as a regular success message
|
||||||
return reportSuccess();
|
return reportSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -125,10 +129,12 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount, uint64_t deliveryTag, bool redelivered)
|
virtual const std::shared_ptr<Deferred> &reportSuccess(uint32_t messagecount, uint64_t deliveryTag, bool redelivered)
|
||||||
{
|
{
|
||||||
// this is the same as a regular success message
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) messagecount;
|
(void) messagecount;
|
||||||
(void) deliveryTag;
|
(void) deliveryTag;
|
||||||
(void) redelivered;
|
(void) redelivered;
|
||||||
|
|
||||||
|
// this is the same as a regular success message
|
||||||
return reportSuccess();
|
return reportSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -139,8 +145,10 @@ protected:
|
||||||
*/
|
*/
|
||||||
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name)
|
virtual const std::shared_ptr<Deferred> &reportSuccess(const std::string &name)
|
||||||
{
|
{
|
||||||
// this is the same as a regular success message
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) name;
|
(void) name;
|
||||||
|
|
||||||
|
// this is the same as a regular success message
|
||||||
return reportSuccess();
|
return reportSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
* Base class for frames. This base class can not be constructed from outside
|
* Base class for frames. This base class can not be constructed from outside
|
||||||
* the library, and is only used internally.
|
* the library, and is only used internally.
|
||||||
*
|
*
|
||||||
* @copyright 2014 Copernica BV
|
* @copyright 2014 - 2018 Copernica BV
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -90,6 +90,7 @@ public:
|
||||||
*/
|
*/
|
||||||
virtual bool process(ConnectionImpl *connection)
|
virtual bool process(ConnectionImpl *connection)
|
||||||
{
|
{
|
||||||
|
// make sure compilers dont complain about unused parameters
|
||||||
(void) connection;
|
(void) connection;
|
||||||
|
|
||||||
// this is an exception
|
// this is an exception
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue