nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] bakaid commented on a change in pull request #713: MINIFICPP-1119 unify win/posix sockets + clean up issues
Date Mon, 10 Feb 2020 17:07:07 GMT
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_r377166953
 
 

 ##########
 File path: libminifi/include/io/ClientSocket.h
 ##########
 @@ -39,13 +45,22 @@ namespace nifi {
 namespace minifi {
 namespace io {
 
+#ifdef WIN32
+using SocketDescriptor = SOCKET;
+using ip4addr = in_addr;
+#else
+using SocketDescriptor = int;
+using ip4addr = in_addr_t;
+static constexpr auto INVALID_SOCKET = -1;
 
 Review comment:
   Since we use this expression to compare with `SocketDescriptor`s I think it would be nicer
from a readability standpoint if this were `SocketDescriptor`, not `auto`.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message