changeset 282:ea55a3886da0

Socket: * interface seems to be a reserved word on MS * include ws2tcpip.h for socklen_t
author David Demelier <markand@malikania.fr>
date Mon, 27 Oct 2014 11:20:49 +0100
parents 91eb0583df52
children d2d5a14bae10
files C++/Socket.cpp C++/Socket.h C++/SocketAddress.h C++/Tests/Sockets/main.cpp
diffstat 4 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/C++/Socket.cpp	Fri Oct 24 18:28:39 2014 +0200
+++ b/C++/Socket.cpp	Mon Oct 27 11:20:49 2014 +0100
@@ -330,8 +330,8 @@
 		throw error::Failure("socket", syserror());
 }
 
-Socket::Socket(Handle handle, std::shared_ptr<SocketInterface> interface)
-	: m_interface(std::move(interface))
+Socket::Socket(Handle handle, std::shared_ptr<SocketInterface> iface)
+	: m_interface(std::move(iface))
 	, m_handle(handle)
 {
 }
--- a/C++/Socket.h	Fri Oct 24 18:28:39 2014 +0200
+++ b/C++/Socket.h	Mon Oct 27 11:20:49 2014 +0100
@@ -297,7 +297,7 @@
 	 * @param handle the handle
 	 * @param interface the interface to use
 	 */
-	Socket(Handle handle, std::shared_ptr<SocketInterface> interface);
+	Socket(Handle handle, std::shared_ptr<SocketInterface> iface);
 
 	/**
 	 * Close the socket.
--- a/C++/SocketAddress.h	Fri Oct 24 18:28:39 2014 +0200
+++ b/C++/SocketAddress.h	Mon Oct 27 11:20:49 2014 +0100
@@ -23,6 +23,7 @@
 
 #if defined(_WIN32)
 #  include <Winsock2.h>
+#  include <Ws2tcpip.h>
 #else
 #  include <sys/socket.h>
 #endif
--- a/C++/Tests/Sockets/main.cpp	Fri Oct 24 18:28:39 2014 +0200
+++ b/C++/Tests/Sockets/main.cpp	Mon Oct 27 11:20:49 2014 +0100
@@ -113,7 +113,6 @@
 					if (tries >= 10)
 						running = false;
 				} catch (const Timeout &) {
-					puts("DEBUG: TIMEOUT");
 				}
 			}
 		} catch (const std::exception &ex) {