We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0faa7c1 commit 042a49dCopy full SHA for 042a49d
include/erlzmq.hrl
@@ -62,7 +62,7 @@
62
%% <i>For more information see
63
%% <a href="http://api.zeromq.org/master:zmq_bind">zmq_bind</a> or
64
%% <a href="http://api.zeromq.org/master:zmq_connect">zmq_connect</a></i>
65
--type erlzmq_endpoint() :: string().
+-type erlzmq_endpoint() :: string() | binary().
66
67
%% Standard error atoms.
68
-type errno() :: eperm | enoent | srch | eintr | eio | enxio | ebad |
src/erlzmq.erl
@@ -138,7 +138,10 @@ socket(Context, Type, {active, false}) ->
138
erlzmq_error().
139
bind({I, Socket}, Endpoint)
140
when is_integer(I), is_list(Endpoint) ->
141
- erlzmq_nif:bind(Socket, Endpoint).
+ erlzmq_nif:bind(Socket, Endpoint);
142
+bind({I, Socket}, Endpoint)
143
+ when is_integer(I), is_binary(Endpoint) ->
144
+ bind({I, Socket}, binary_to_list(Endpoint)).
145
146
%% @doc Connect a socket.
147
%% <br />
@@ -151,7 +154,10 @@ bind({I, Socket}, Endpoint)
151
154
152
155
connect({I, Socket}, Endpoint)
153
156
- erlzmq_nif:connect(Socket, Endpoint).
157
+ erlzmq_nif:connect(Socket, Endpoint);
158
+connect({I, Socket}, Endpoint)
159
160
+ connect({I, Socket}, binary_to_list(Endpoint)).
161
162
%% @equiv send(Socket, Msg, [])
163
-spec send(erlzmq_socket(),
0 commit comments