32 #if defined (ZMQ_HAVE_WINDOWS) 33 # include <winsock2.h> 36 # include <sys/socket.h> 37 # include <netinet/in.h> 41 #if defined (ZMQ_HAVE_WINDOWS) 46 if (WSAStartup(MAKEWORD(2,0), &info) != 0)
47 throw std::runtime_error(
"Could not start WSA");
52 return closesocket (fd);
75 if (
zmq_bind (dealer,
"tcp://127.0.0.1:5670") == -1) {
76 printf (
"E: Cannot find 127.0.0.1 -- your system does not have local\n");
77 printf (
"E: networking. Please fix this before running libzmq checks.\n");
83 for (count = 0; count < 1000; count++) {
84 handle [count] = socket (AF_INET, SOCK_STREAM, IPPROTO_TCP);
85 if (handle [count] == -1) {
86 printf (
"W: Only able to create %d sockets on this box\n", count);
87 printf (
"I: Tune your system to increase maximum allowed file handles\n");
88 #if defined (ZMQ_HAVE_OSX) 89 printf (
"I: On OS/X, run 'ulimit -n 1200' in bash");
90 #elif defined (ZMQ_HAVE_LINUX) 91 printf (
"I: On Linux, run 'ulimit -n 1200' in bash");
97 for (count = 0; count < 1000; count++) {
ZMQ_EXPORT void * zmq_ctx_new(void)
ZMQ_EXPORT void * zmq_socket(void *, int type)
void initialise_network(void)
ZMQ_EXPORT int zmq_close(void *s)
ZMQ_EXPORT int zmq_bind(void *s, const char *addr)
ZMQ_EXPORT int zmq_ctx_term(void *context)