I try to use a pull socket with ezmq, but I get an error saying there is an error in the socket_type.
#! /usr/bin/env escript
%%! -pa deps/ezmq/ebin -Wall debug verbose
main(_) ->
{ok, Socket} = ezmq:start([{type, pull}]),
ezmq:connect(Socket, {127, 0, 0, 1}, 5558, []),
loop(Socket, 0),
ok = ezmq:close(Socket).
loop(_Socket, 10) ->
ok;
loop(Socket, N) ->
{ok, Request} = ezmq:recv(Socket),
io:format("Received '~s' ~w~n", [Request, N]),
loop(Socket, N+1).
escript: exception error: no match of right hand side value {error,invalid_opts}
I try to use a pull socket with ezmq, but I get an error saying there is an error in the socket_type.
escript: exception error: no match of right hand side value {error,invalid_opts}