[zeromq-dev] tcp protocol not supported on socket of type ZMQ_REQ

Tomasz Michalski tmichalski23 at gmail.com
Thu Aug 29 14:19:38 CEST 2019

I have problem with usage of zeromq.

I am able to create server socket over tcp:
    zmq::context_t context(1);
    zmq::socket_t sock(context, ZMQ_REP);
        sock.bind("udp://*:5555"); //BTW: ip address of this server is
        setDefaultSocketOptions(sock, INFINITY_WAIT_TIME);

but I am not able to create tcp socket on the same machine in order to send
// Socket to talk to server
    zmq::context_t context(1);
    zmq::socket_t sock (context, ZMQ_REQ);
        sock.connect("tcp:://"); //even if I changed 5555
to 5556 this doesn't work as well
I get output:
Protocol not supported.

Both server and client apps are created on machine in
different processes. One process is daemon server listener and waits for
incoming messages,
the other one is invoked from shell by user and tries to send some data to
machine But i got this output when creating client socket:
protocol not supported and I have no idea how to fix this.

I tried also use udp. Here is even worse situation. After I change string
"tcp" with "udp" I am not able even to create server socket - get output:
The protocol is not compatible with the socket type. I have also no idea
how to fix this one.

If somebody can help I would be gratefull.
Processes are running/started in altera linux environment. Maybe I should
check some linux configuration but I am not specialist in it. Nevertheless
THERE IS ping between machine and so network is
working at all.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20190829/ce5d6743/attachment.htm>

More information about the zeromq-dev mailing list