killnine / hubconnectionmanager Goto Github PK
View Code? Open in Web Editor NEWSignalR extension to help retry connecting to server if initialization fails on startup. Also provides more convenient unit testing interface.
SignalR extension to help retry connecting to server if initialization fails on startup. Also provides more convenient unit testing interface.
There should be a method to expose the ability of providing the Client SSL Certificate to the connection.
Support 4.0, 4.5, PCL targets.
The scenario is:
SignalR Server is down for upgrade/maintenance
Client tries to connect to SignalR Server initially.
workaround:
wrap _HubConnectionManager.Initialize();
in a try...catch... block that squelches the error.
Wondering if this is the best case, or if we should squelch it within the HubConnectionManager class itself?
As of 1.0.2, the Manager will always try and reconnect any time that it detects the Closed
event. Probably need to prevent this. Users may want to eventually disconnect ;)
Not sure how helpful this is/will be:
public static class HubConnectionExtensions {
public async static void WithOAuthToken(this HubConnection connection, Uri authUri, string accessToken) {
var cookies = new CookieContainer();
var clientHandler = new System.Net.Http.HttpClientHandler {
UseCookies = true,
CookieContainer = cookies
};
var client = new HttpClient(clientHandler) {
BaseAddress = new Uri(connection.Url)
};
client.SetBearerToken(accessToken);
var result = await client.GetAsync(authUri);
result.EnsureSuccessStatusCode();
connection.CookieContainer = cookies;
}
}
When running SignalR.Server
and SignalR.Client
together for testing, it seems like the server will run fine for a while, but if I restart the server to test the Client's ability to reconnect, the Server will unexpectedly shut down after a short period.
Not sure if I am fat-fingering a key and causing it to close, or something is being disposed prematurely and causing the application to crash.
Looking for input on what happens after a disconnect (not just connection interruption, but after the DisconnectTimeout period ends and the client disconnects).
According to ASP.NET documentation, all Group subscriptions are lost after a disconnect. Just looking for input on what the best course of action should be on the part of the HubConnectionManager after this happens.
Should it facilitate re-subscribing to those groups after connection is re-established?
Currently, I am doing this manually on the client by subscribing to the StateChanged
event and calling a method on the Hub that subscribes again to the appropriate groups.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.