Giter VIP home page Giter VIP logo

Comments (7)

sbinet avatar sbinet commented on August 16, 2024

you're right.

from zmq4.

ckoehler avatar ckoehler commented on August 16, 2024

May be as simple as removing the check and return at

zmq4/socket.go

Line 236 in 59e906c

if retries < 10 {
. The sleep is a good idea. No expert, though.

Also, thanks so much for doing this, it's saving me a lot of pain trying to build my app for other architectures. No CGO is a win!

from zmq4.

ckoehler avatar ckoehler commented on August 16, 2024

This is a better reference: https://rfc.zeromq.org/spec/23/#socket-semantics

from zmq4.

guidog avatar guidog commented on August 16, 2024

Hi!

At the moment the user facing .Dial is synchronous. This should be kept that way.

The spec talks about "reconnect", which in my view is something different from the initial connect.

I would opt for the following:

  1. leave the initial connect synchronous to get some errors back (network unreachable, unknown host etc.)
  2. implement a reconnect method used after there has been a successful first connection

While implementing 1. I'd like to add a context.Context to the .Dial methods or add a .DialContext method.

Cheers
Guido

from zmq4.

thielepaul avatar thielepaul commented on August 16, 2024

I think that the numbers of retries should be configurable, if the user sets it to infinite (could be -1 or so) then the behavior will be very similar to the libzmq implementation, while still being synchronous

from zmq4.

sbinet avatar sbinet commented on August 16, 2024

sure, why not.
do you want to try your hand at a PR?

from zmq4.

thielepaul avatar thielepaul commented on August 16, 2024

do you want to try your hand at a PR?

yes, I think I could. Not sure when I will have time for it, though

from zmq4.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.