diff --git a/CMakeLists.txt b/CMakeLists.txt index a3f858d..7c84747 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -21,7 +21,7 @@ set (SO_VERSION ${VERSION_MAJOR}.${VERSION_MINOR}) # build options 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) # ensure c++11 on all compilers diff --git a/include/amqpcpp/libboostasio.h b/include/amqpcpp/libboostasio.h index 68daf20..c1492f5 100644 --- a/include/amqpcpp/libboostasio.h +++ b/include/amqpcpp/libboostasio.h @@ -176,7 +176,7 @@ protected: * @note The handler will get called if a read is cancelled. */ void read_handler(const boost::system::error_code &ec, - const std::size_t, + const std::size_t bytes_transferred, const std::weak_ptr awpWatcher, TcpConnection *const connection, const int fd) @@ -210,7 +210,7 @@ protected: * @note The handler will get called if a write is cancelled. */ void write_handler(const boost::system::error_code ec, - const std::size_t, + const std::size_t bytes_transferred, const std::weak_ptr awpWatcher, TcpConnection *const connection, const int fd) diff --git a/include/amqpcpp/linux_tcp/tcphandler.h b/include/amqpcpp/linux_tcp/tcphandler.h index 08ffc0f..9b0c87d 100644 --- a/include/amqpcpp/linux_tcp/tcphandler.h +++ b/include/amqpcpp/linux_tcp/tcphandler.h @@ -56,7 +56,7 @@ public: * @param ssl Pointer to the SSL structure that can be inspected * @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 return true; @@ -73,7 +73,7 @@ public: * * @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 return interval; @@ -85,7 +85,7 @@ public: * secure TLS connection, and the AMQP login handshake has been completed. * @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 @@ -93,20 +93,20 @@ public: * * @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 * @param connection The TCP connection * @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 * @param connection The TCP connection */ - virtual void onClosed(TcpConnection *) {} + virtual void onClosed(TcpConnection *connection) {} /** * Monitor a filedescriptor for readability or writability diff --git a/src/linux_tcp/pipe.h b/src/linux_tcp/pipe.h index c7b4464..d374d7b 100644 --- a/src/linux_tcp/pipe.h +++ b/src/linux_tcp/pipe.h @@ -82,8 +82,7 @@ public: char byte = 0; // send one byte over the pipe - this will wake up the other thread - if (write(_fds[1], &byte, 1) == -1) - throw std::runtime_error(strerror(errno)); + write(_fds[1], &byte, 1); } };