[zeromq-dev] zmq_connect() bug in win32?
kasicass
kasicass at gmail.com
Fri Apr 29 06:52:33 CEST 2011
hi,
I found a crash when, in win32, zmq_connect() runs before any apps do
zmq_bind() at the endpoint(ip:port).
I think is a bug here and my testbed is Windows XP SP2, VS 2008,
zeromq-2.1.6 stable
============= test.cpp ===============
int main()
{
void *ctx, *sub;
ctx = zmq_init(1);
sub = zmq_socket(ctx, ZMQ_SUB);
zmq_connect(sub, "tcp://127.0.0.1:8888");
zmq_setsockopt(sub, ZMQ_SUBSCRIBE, "", 0);
printf("begin client-sub!\n");
zmq_term(ctx);
return 0;
}
=============== output: ===============
begin client-sub!
Unknown error
errno == WSAECONNREFUSED || errno == WSAETIMEDOUT || errno ==
WSAECONNABORTED ||
errno == WSAEHOSTUNREACH (..\..\..\src\tcp_connecter.cpp:123)
The errno returned here is WSAENETUNREACH which doesn't be deal with.
--
Kasicass, coder at work
More information about the zeromq-dev
mailing list