Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Update hwserver.cpp #310

Merged
merged 1 commit into from

2 participants

@damian123

Added Windows defines

@damian123 damian123 Update hwserver.cpp
Added Windows defines
bf88c1a
@hintjens hintjens merged commit d727c6e into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 23, 2013
  1. @damian123

    Update hwserver.cpp

    damian123 authored
    Added Windows defines
This page is out of date. Refresh to see the latest.
Showing with 9 additions and 1 deletion.
  1. +9 −1 examples/C++/hwserver.cpp
View
10 examples/C++/hwserver.cpp
@@ -6,7 +6,11 @@
#include <zmq.hpp>
#include <string>
#include <iostream>
+#ifndef _WIN32
#include <unistd.h>
+#else
+#include <windows.h>
+#endif
int main () {
// Prepare our context and socket
@@ -22,7 +26,11 @@ int main () {
std::cout << "Received Hello" << std::endl;
// Do some 'work'
- sleep (1);
+#ifndef _WIN32
+ sleep(1);
+else
+ Sleep (1);
+#endif
// Send reply back to client
zmq::message_t reply (5);
Something went wrong with that request. Please try again.