Reverted override of option (and other minor changes)

This commit is contained in:
Carl Cook 2018-10-03 10:29:19 +13:00
parent c293114ce0
commit d3f4d28ecd
4 changed files with 10 additions and 11 deletions

View File

@ -21,7 +21,7 @@ set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR})
# build options # build options
option(AMQP-CPP_BUILD_SHARED "Build shared library. If off, build will be static." OFF) option(AMQP-CPP_BUILD_SHARED "Build shared library. If off, build will be static." OFF)
option(AMQP-CPP_LINUX_TCP "Build linux sockets implementation." ON) option(AMQP-CPP_LINUX_TCP "Build linux sockets implementation." OFF)
option(AMQP-CPP_BUILD_EXAMPLES "Build amqpcpp examples" OFF) option(AMQP-CPP_BUILD_EXAMPLES "Build amqpcpp examples" OFF)
# ensure c++11 on all compilers # ensure c++11 on all compilers

View File

@ -176,7 +176,7 @@ protected:
* @note The handler will get called if a read is cancelled. * @note The handler will get called if a read is cancelled.
*/ */
void read_handler(const boost::system::error_code &ec, void read_handler(const boost::system::error_code &ec,
const std::size_t, const std::size_t bytes_transferred,
const std::weak_ptr<Watcher> awpWatcher, const std::weak_ptr<Watcher> awpWatcher,
TcpConnection *const connection, TcpConnection *const connection,
const int fd) const int fd)
@ -210,7 +210,7 @@ protected:
* @note The handler will get called if a write is cancelled. * @note The handler will get called if a write is cancelled.
*/ */
void write_handler(const boost::system::error_code ec, void write_handler(const boost::system::error_code ec,
const std::size_t, const std::size_t bytes_transferred,
const std::weak_ptr<Watcher> awpWatcher, const std::weak_ptr<Watcher> awpWatcher,
TcpConnection *const connection, TcpConnection *const connection,
const int fd) const int fd)

View File

@ -56,7 +56,7 @@ public:
* @param ssl Pointer to the SSL structure that can be inspected * @param ssl Pointer to the SSL structure that can be inspected
* @return bool True to proceed / accept the connection, false to break up * @return bool True to proceed / accept the connection, false to break up
*/ */
virtual bool onSecured(TcpConnection *, const SSL *) virtual bool onSecured(TcpConnection *connection, const SSL *ssl)
{ {
// default implementation: do not inspect anything, just allow the connection // default implementation: do not inspect anything, just allow the connection
return true; return true;
@ -73,7 +73,7 @@ public:
* *
* @see ConnectionHandler::onNegotiate * @see ConnectionHandler::onNegotiate
*/ */
virtual uint16_t onNegotiate(TcpConnection *, uint16_t interval) virtual uint16_t onNegotiate(TcpConnection *connection, uint16_t interval)
{ {
// default implementation, suggested heartbeat is ok // default implementation, suggested heartbeat is ok
return interval; return interval;
@ -85,7 +85,7 @@ public:
* secure TLS connection, and the AMQP login handshake has been completed. * secure TLS connection, and the AMQP login handshake has been completed.
* @param connection The TCP connection * @param connection The TCP connection
*/ */
virtual void onConnected(TcpConnection *) {} virtual void onConnected(TcpConnection *connection) {}
/** /**
* Method that is called when the server sends a heartbeat to the client * Method that is called when the server sends a heartbeat to the client
@ -93,20 +93,20 @@ public:
* *
* @see ConnectionHandler::onHeartbeat * @see ConnectionHandler::onHeartbeat
*/ */
virtual void onHeartbeat(TcpConnection *) {} virtual void onHeartbeat(TcpConnection *connection) {}
/** /**
* Method that is called when the TCP connection ends up in an error state * Method that is called when the TCP connection ends up in an error state
* @param connection The TCP connection * @param connection The TCP connection
* @param message Error message * @param message Error message
*/ */
virtual void onError(TcpConnection *, const char *) {} virtual void onError(TcpConnection *connection, const char *message) {}
/** /**
* Method that is called when the TCP connection is closed * Method that is called when the TCP connection is closed
* @param connection The TCP connection * @param connection The TCP connection
*/ */
virtual void onClosed(TcpConnection *) {} virtual void onClosed(TcpConnection *connection) {}
/** /**
* Monitor a filedescriptor for readability or writability * Monitor a filedescriptor for readability or writability

View File

@ -82,8 +82,7 @@ public:
char byte = 0; char byte = 0;
// send one byte over the pipe - this will wake up the other thread // send one byte over the pipe - this will wake up the other thread
if (write(_fds[1], &byte, 1) == -1) write(_fds[1], &byte, 1);
throw std::runtime_error(strerror(errno));
} }
}; };