bakaid commented on a change in pull request #713: MINIFICPP-1119 unify
win/posix sockets + clean up issues
URL: https://github.com/apache/nifi-minifi-cpp/pull/713#discussion_r377190276
##########
File path: libminifi/src/io/ClientSocket.cpp
##########
@@ -51,50 +50,57 @@ namespace nifi {
namespace minifi {
namespace io {
-Socket::Socket(const std::shared_ptr<SocketContext> &context, const
std::string &hostname, const uint16_t port, const uint16_t listeners = -1)
- : requested_hostname_(hostname),
+static std::string get_last_err_str() noexcept {
+#ifdef WIN32
+ const auto error_code = WSAGetLastError();
+#else
+ const auto error_code = errno;
+#endif /* WIN32 */
+ return std::system_category().message(error_code);
Review comment:
Nice!
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services