diff options
author | Angelo Mantellini <manangel@cisco.com> | 2019-01-30 12:11:34 +0100 |
---|---|---|
committer | Angelo Mantellini <manangel@cisco.com> | 2019-01-30 15:23:44 +0100 |
commit | e5145b878f9de35676085409878a66899d2ee4f2 (patch) | |
tree | 177f77810901921ee03d1d3b850600c5f2cd1ef9 /libtransport/src/hicn/transport/core/socket_connector.cc | |
parent | 30061551cd39c9f30280bfa0cf3cc909f4fac015 (diff) |
[HICN-18] first commit of libtransport for windows
Change-Id: I3a43b22194aa13ae5de1746e3d4bd9a275070261
Signed-off-by: Angelo Mantellini <manangel@cisco.com>
Diffstat (limited to 'libtransport/src/hicn/transport/core/socket_connector.cc')
-rw-r--r-- | libtransport/src/hicn/transport/core/socket_connector.cc | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/libtransport/src/hicn/transport/core/socket_connector.cc b/libtransport/src/hicn/transport/core/socket_connector.cc index 704d3badb..84a843f14 100644 --- a/libtransport/src/hicn/transport/core/socket_connector.cc +++ b/libtransport/src/hicn/transport/core/socket_connector.cc @@ -13,6 +13,9 @@ * limitations under the License. */ +#ifdef _WIN32 +#include <hicn/transport/portability/win_portability.h> +#endif #include <hicn/transport/core/socket_connector.h> #include <hicn/transport/errors/errors.h> #include <hicn/transport/utils/log.h> @@ -130,7 +133,8 @@ void SocketConnector::doWrite() { if (!output_buffer_.empty()) { doWrite(); } - } else if (ec.value() == static_cast<int>(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast<int>(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { @@ -149,7 +153,8 @@ void SocketConnector::doReadBody(std::size_t body_length) { if (TRANSPORT_EXPECT_TRUE(!ec)) { receive_callback_(std::move(read_msg_)); doReadHeader(); - } else if (ec.value() == static_cast<int>(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast<int>(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { @@ -176,7 +181,8 @@ void SocketConnector::doReadHeader() { } else { TRANSPORT_LOGE("Decoding error. Ignoring packet."); } - } else if (ec.value() == static_cast<int>(std::errc::operation_canceled)) { + } else if (ec.value() == + static_cast<int>(std::errc::operation_canceled)) { // The connection has been closed by the application. return; } else { |