Fixing range for `Connect to a hub` section sample code.
Current code shows this:
```js
const connection = new signalR.HubConnectionBuilder()
.withUrl("/chatHub")
.configureLogging(signalR.LogLevel.Information)
.build();
start();
/* this is here to show an alternative to start, with a then
```
New should show this:
```js
const connection = new signalR.HubConnectionBuilder()
.withUrl("/chatHub")
.configureLogging(signalR.LogLevel.Information)
.build();
async function start() {
try {
await connection.start();
console.log("connected");
} catch (err) {
console.log(err);
setTimeout(() => start(), 5000);
}
};
connection.onclose(async () => {
await start();
});
// Start the connection.
start();
/* this is here to show an alternative to start, with a then
connection.start().then(() => console.log("connected"));
*/
/* this is here to show another alternative to start, with a catch
connection.start().catch(err => console.error(err));
*/
```
* Testserver limitations
* Testserver limitations
* Testserver limitations
* Update aspnetcore/test/middleware.md
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* final fix
Co-authored-by: Chris Ross <Tratcher@Outlook.com>
* add to 3.x section , fix spelling
* Update aspnetcore/performance/caching/middleware.md
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
Co-authored-by: Scott Addie <10702007+scottaddie@users.noreply.github.com>
* Update hubcontext.md
Failing to call next causes bad things to happen. Better to leave it in the example.
* Update hubcontext.md
This shows how to access IHost for use outside of aspnetcore. ie integration with other dependency injection frameworks
* hubcontext.md: Move note back to original location.
* Update hubcontext.md
* Update aspnetcore/signalr/hubcontext.md
Co-authored-by: Brennan <brecon@microsoft.com>
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
Co-authored-by: Brennan <brecon@microsoft.com>
* Add 3.0 SignalR background service sample
* Fix background-services.md date
* Compressed a few monikers
* Renamed 3.0 sample to 3.x
* Apply suggestion
Co-Authored-By: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>
* Shrink ClockHubClient.StopAsync snippet by 1 line
Also tweaked the wording slightly in the "any class that inherits from hub..." note
* Remove future tense from note
* Use async On overload in 3.x sample
Co-authored-by: Rick Anderson <3605364+Rick-Anderson@users.noreply.github.com>