szaszm 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_r374639255
 
 

 ##########
 File path: libminifi/src/io/ClientSocket.cpp
 ##########
 @@ -118,29 +127,26 @@ void Socket::setNonBlocking() {
     nonBlocking_ = true;
   }
 }
-#ifdef WIN32
-int8_t Socket::createConnection(const addrinfo *p, struct in_addr &addr) {
-#else
-int8_t Socket::createConnection(const addrinfo *p, in_addr_t &addr) {
-#endif
+
+int8_t Socket::createConnection(const addrinfo *p, ip4addr &addr) {
   if ((socket_file_descriptor_ = socket(p->ai_family, p->ai_socktype, 
p->ai_protocol)) == INVALID_SOCKET) {
 
 Review comment:
   `INVALID_SOCKET` is the `-1` of windows. It only means that there was an 
error, but different errors do not correspond to different return values.

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


With regards,
Apache Git Services

Reply via email to