-
Notifications
You must be signed in to change notification settings - Fork 71
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
Setting socket Timeout on Instrument Class #21
Comments
What leads you to believe that the timeout is not set on the socket?
|
I am using your library to search for instruments at predetermined IP addresses and rely on quick timeouts on addresses to make my search reasonably quick. Admittedly, this is a pretty dumb way to do this, but it's what I have to work with. I was using this method, and changing the timeout parameter in the instrument class did not seem to have an effect. Looking through your code some more, it seems on first connection, the first socket opened on line 260,
as part of TCPClient does not have a timeout set explicitly. Only after a valid connection is established is the timeout set to the socket. I don't believe this is a bug in your implementation, just a weird use case I have. I managed to set a timeout for initial connections by calling I'm closing this as I don't think that the average user will need to set this parameter for initial socket connections. I have no idea how VXI-11 is laid out, so I have no idea how useful this info will be to others. Thanks for an amazing library. |
Aha, I see. You're talking about the timeout for the portmapper call. I will take a look at implementing a good way of setting that. It may also be a good idea to roll a similar function into the list_devices call. Right now it uses UDP broadcast, which is not completely reliable. Having the option to attempt TCP connections to an explicit list could be a useful feature. |
Reading through the code, seems as though doing:
would work appropriately for setting the
socket
timeout duration.Unfortunately, it seems the
socket
timeout duration is the same regardless of me setting this value.Any thoughts on this?
The text was updated successfully, but these errors were encountered: