Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

transport.connect with a DNS name fails -- works with a pre-made zmq_sock #56

Closed
elonen opened this issue Jul 30, 2015 · 1 comment
Closed

Comments

@elonen
Copy link

elonen commented Jul 30, 2015

Connecting a (Dealer) socket with a DNS name raises ValueError: 'example.com' does not appear to be an IPv4 or IPv6 address:

import zmq, aiozmq, asyncio
def test():
  socket = yield from aiozmq.create_zmq_stream(zmq.DEALER)
  socket.transport.setsockopt(zmq.IDENTITY, b'myidentity')
  yield from socket.transport.connect('tcp://example.com:1234')
asyncio.get_event_loop().run_until_complete(test())

The following works, however:

context = zmq.Context()
zmq_socket = context.socket(zmq.DEALER)
zmq_socket.setsockopt(zmq.IDENTITY, b'myidentity')
zmq_socket.connect('tcp://example.com:1234')
socket = yield from aiozmq.create_zmq_stream(zmq.DEALER, zmq_sock=zmq_socket)

Versions:
aiozmq==0.6.1
pyzmq==14.7.0

@asvetlov
Copy link
Member

Fixed. Try new 0.7 release

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants