-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
implements set_interface #164
Conversation
testing this is difficult because:
test coverage can improve by extracting the network interface selection to a new file but there are still some cracks... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still need to know how the tests are doing. Let me check
pyre/zbeacon.py
Outdated
|
||
|
||
class ZBeacon(object): | ||
|
||
def __init__(self, ctx, pipe, *args, **kwargs): | ||
self.ctx = ctx # ZMQ context | ||
self.pipe = pipe # Actor command pipe | ||
self.ctx = ctx # ZMQ context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can please undo the whitespace changes? It has nothing to do with the change and it renders the change history useless in case of tracing changes.
pyre/zbeacon.py
Outdated
|
||
if self.address: | ||
break | ||
return |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is fine as a first implementation. Have you looked at how this is handled in zyre(czmq). The interface is selected by either its name or its address. In case the string is a single digit it just uses the index in the interface list.
I think tests don't run because of deprecation? #165 |
I agree. The only decent approach would be to extract the interface name (real or virtual) and try to capture the broadcast. But then it would also need to test on a different interface to see it doesn't capture a broadcast. I'm fine with merging this. I only don't know if this kills any existing functionality.... |
why was this closed? |
i needed to put the master branch in my fork in sync with this, i've pushed this change to another branch and i can't seem to change the source branch after creating a pr |
Usually you never work from your own master branch. You create a branch for every change you want to do and push that branch to your github repo from which you create the PR. |
attempts to find and try the interface that matches the interface_name
falls back to looping through the interfaces as before