microsoft/teams.net

Public

mirrored from https://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
v2.0.0-preview.6

Branches

Tags

  • No tags available.
0Branches0Tags
Go to file
Add file
Code

Clone

HTTPS

Download ZIP

Libraries/Microsoft.Teams.Plugins/Microsoft.Teams.Plugins.AspNetCore.DevTools/Extensions/WebSocket.cs

14lines · modecode

1using System.Net.WebSockets;
2
3namespace Microsoft.Teams.Plugins.AspNetCore.DevTools.Extensions;
4
5public static class WebSocketExtensions
6{
7 public static bool IsCloseable(this WebSocket socket)
8 {
9 return (
10 socket.State != WebSocketState.Closed &&
11 socket.State != WebSocketState.Aborted
12 );
13 }
14}