dotnet / dotnet/AspNetCore.Docs

Asp.Net Core WebSocket documentation inaccuracy.

Open
#29,309 3 comments 0 reactions 1 assignee Claimed by @wadepickett View on GitHub
doc-enhancement Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

There is a section "**Handle client disconnects**". According to this section we can detect client lost internet connection by ping timeout. See: "have the client use a timer to send a ping message every X seconds." But there is no possibility to track ping/pong messages. It's deep inside ManagedWebSocket (https://github.com/dotnet/dotnet/blob/eb24b2bf58a85e34199f319b60c30551e65984c5/src/runtime/src/libraries/System.Net.WebSockets/src/System/Net/WebSockets/ManagedWebSocket.cs#L735). What do you mean when you say "a ping message every X seconds". Does it mean a custom message type? Or does it mean that there are a possibility to react on built in ping/pong messages somehow.

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: a3b0cac1-adc7-434c-d867-6e28e39bdae7
* Version Independent ID: 762efeed-010e-f422-03d0-22d6681b2851
* Content: [WebSockets support in ASP.NET Core](https://learn.microsoft.com/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-3.1)
* Content Source: [aspnetcore/fundamentals/websockets.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/fundamentals/websockets.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-fundamentals**
* GitHub Login: @wadepickett
* Microsoft Alias: **wpickett**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.