ClientWebSocket Class

net 6 newbie 121 Reputation points
2024-09-28T08:08:35.4333333+00:00

In ClientWebSocket Class how to set up Compression?
Does we have to set the header "Sec-WebSocket-Extensions" manually for compression?
Does the SendAync() method compresses before sending or it has to be compressed manually before sending?

And in similar lines ReceiveAsync() will have compressed one or actual content?

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,877 questions
ASP.NET Core
ASP.NET Core
A set of technologies in the .NET Framework for building web applications and XML web services.
4,573 questions
C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,962 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Bruce (SqlWork.com) 65,576 Reputation points
    2024-09-28T16:02:49.31+00:00

    As compression adds a security risk (CRIME/BREACH) it is not the default. You must enable manually.

    https://zcusa.951200.xyz/en-us/aspnet/core/fundamentals/websockets?view=aspnetcore-8.0#compression

    0 comments No comments

  2. net 6 newbie 121 Reputation points
    2024-09-30T06:03:44.7966667+00:00

    I am not sending any sensitive information . Need help in detail steps in enabling compression


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.