Skip to content

No pull socket? #5

@matrixise

Description

@matrixise

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}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions