Bump up version we test for binary protocol (per advice from Dormando).
[awesomized/libmemcached] / clients / utilities.c
index b51665a69bfc43478e873b1bb4382a86ab099edf..52f46b40562fc55b1bcc5b4b79ea1944de643cd8 100644 (file)
@@ -216,3 +216,16 @@ void shutdown_sasl(void)
     sasl_done();
 #endif
 }
+
+void initialize_sockets(void)
+{
+  /* Define the function for all platforms to avoid #ifdefs in each program */
+#ifdef WIN32
+  WSADATA wsaData;
+  if (WSAStartup(MAKEWORD(2,0), &wsaData) != 0)
+  {
+    fprintf(stderr, "Socket Initialization Error. Program aborted\n");
+    exit(EXIT_FAILURE);
+  }
+#endif
+}