[zeromq-dev] Problem with multiple sockets under Windows: Address already in use

Martin Sustrik sustrik at 250bpm.com
Mon Jun 20 15:36:42 CEST 2011


Hi Seref,

> #include "ZMQTests.h"
>
> int _tmain(int argc, _TCHAR* argv[])
> {
> 	for(int i = 0; i<  1000; i++){
> 		void *context = zmq_init(1);
> 		void *socket = zmq_socket(context, ZMQ_REQ);
> 		zmq_connect(socket,"tcp://127.0.0.1:5560");
> 		//do nothing with the socket		
> 		zmq_close(socket);
> 		zmq_term(context);
> 	}
> 	
> 	return 0;
> }

What's the error? I doesn't seem you are cheking the error codes. Is it 
an access violation or what?

Martin



More information about the zeromq-dev mailing list