-
Notifications
You must be signed in to change notification settings - Fork 164
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
reconnect to new hubServerUrl #192
Comments
It's not currently set up for your use case. Can you just determine the best server before making the initial connect? |
yes i cant, but my purpose is that i want to check list of servers that get from Backend in an interval and then check best server base on user internet speed and want to change the connection, is there any recommendation for solving this problem? or any update to handle it? |
This is very useful feature for us if we can have it, a server may go down or get overloaded, so client can determine a better or alternative server at any given time in multi-server environment. This would eliminate the need for GLSB's such as Amazon Route 53's latency based dns, not to mention with DNS we may not quickly and seamlessly switch user to a new working server as DNS would take a while to update. |
Try this: Add the following to import dotnetify from 'dotnetify';
Object.defineProperty(dotnetify, 'hubServerUrl', {
get: () => dotnetify.hub.url,
set: url => {
dotnetify.hub.url = url;
if (dotnetify._hub) {
dotnetify._hub = null;
dotnetify.startHub();
}
}
}); |
I'm so grateful for your help |
In my project, I set hubServerUrl in the main.js, but i want to ping many server and then connect to best one, i need to disconnect from previous hubServerUrl and then connect to new hubServerUrl. How can i handle this changing hubServerUrl? Is it possible to change it base on an event?
i try to use it for changing url but cant connect to new one:
The text was updated successfully, but these errors were encountered: