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

Tomasz Michalski tmichalski23 at gmail.com
Thu Aug 29 14:20:40 CEST 2019


of course here is sock.bind("tcp://*:5555"), not udp

czw., 29 sie 2019 o 14:19 Tomasz Michalski <tmichalski23 at gmail.com>
napisał(a):

> Hi
> 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);
>     try
>     {
>         sock.bind("udp://*:5555"); //BTW: ip address of this server is
> 192.168.101.1
>         setDefaultSocketOptions(sock, INFINITY_WAIT_TIME);
>         ...
>
> but I am not able to create tcp socket on the same machine in order to
> send data:
> // Socket to talk to server
>     zmq::context_t context(1);
>     zmq::socket_t sock (context, ZMQ_REQ);
>     try
>     {
>         sock.connect("tcp:://192.168.101.3:5555"); //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 192.168.101.1 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 192.168.101.3. 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 192.168.101.1 and 192.168.101.3 so network is
> working at all.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20190829/e60c8cda/attachment.htm>


More information about the zeromq-dev mailing list