microsoft/teams.net

Public

mirrored fromhttps://github.com/microsoft/teams.netAvailable

CodeCommitsIssuesPull requestsActionsInsightsSecurity
kavin/agents-sdk-interop

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

17lines · modecode

1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4using System.Net.WebSockets;
5
6namespace Microsoft.Teams.Plugins.AspNetCore.DevTools.Extensions;
7
8public static class WebSocketExtensions
9{
10 public static bool IsCloseable(this WebSocket socket)
11 {
12 return (
13 socket.State != WebSocketState.Closed &&
14 socket.State != WebSocketState.Aborted
15 );
16 }
17}