Skip to content

Releases: Marfusios/websocket-client

Version 5.5

19 May 12:15
58767e1

Choose a tag to compare

What's Changed

  • Added a netstandard2.0 target so full .NET Framework applications can consume Websocket.Client again.
  • Kept the existing .NET 6/7/8/9/10 paths on the current Memory<byte>/ReadOnlyMemory<byte> WebSocket APIs, with compatibility fallbacks isolated to netstandard2.0.
  • Modernized the .NET Framework sample to SDK-style net472 with PackageReference dependencies and current Websocket.Client API usage.
  • Added Windows CI coverage for the .NET Framework sample and net472 benchmark build.
  • Added .NET Framework client receive benchmark coverage and documented the measured results.

Compatibility

  • NuGet package version: 5.5.0.
  • Adds support for full .NET Framework consumers through the netstandard2.0 package asset.
  • No breaking API changes for existing .NET Core / modern .NET targets.

Version 5.4

13 May 11:06
298b5ce

Choose a tag to compare

Highlights

  • Published Websocket.Client 5.4.0 to NuGet.
  • Added .NET 9 and .NET 10 targets while keeping the existing supported target frameworks for backward compatibility.
  • Added a BenchmarkDotNet project and documented benchmark results in benchmarks/README.md.
  • Updated the main README with a high-level performance overview for the library.

Performance

  • Optimized receive processing to reduce allocations with pooled buffers and lower-copy message construction.
  • Reduced queued send request overhead by replacing internal request wrapper allocations with a value-type envelope.
  • Added send framing, receive buffering, text encoding, response message, observable property, and logging benchmarks to make future performance changes measurable.
  • Current queued send benchmark improved from 31.54 ns / 24 B to 29.65 ns / 0 B per operation.

Compatibility and Reliability

  • Added ReadOnlySequence<byte> send support and tests for binary-as-text send overload behavior.
  • Added support for reusing an external RecyclableMemoryStreamManager.
  • Fixed reconnect logic and increased the default connect timeout to 5 seconds.
  • Conditionalized dependencies for cleaner target-framework-specific package output.

Notes

  • No intentional public contract breaks.
  • CI now builds with the .NET 10 SDK and the release pipeline passed for this version.

Version 5.1

15 Feb 15:57
fb57ec5

Choose a tag to compare

Features

  • Usage of RecyclableMemoryStream for processing incoming messages. Thanks @Odonno !
  • The new methods available
    • SendAsText(byte[] | ArraySegment<byte>) - send binary message as Text type. Use it to avoid double serialization.

Version 5.0

07 Sep 09:31
ca291cb

Choose a tag to compare

Breaking changes

  • removed LibLog in favor of Microsoft.Extensions.Logging. You need to provide ILogger instance in the constructor parameter.
  • library no longer targeting netstandard2.0 and net5

Features

  • nullable reference types enabled, you should now get a better info on what can be null

Version 4.0

05 Dec 16:00
06c9d90

Choose a tag to compare

Breaking changes

  • timeout properties changed from milliseconds (int) to TimeSpan
  • DisconnectionHappened, ReconnectionHappened streams now return complex info object instead of enum
  • changed return type from Task to void in Send() methods (sending is done through the queue)

Features

  • ability to disable last chance reconnection (when no message comes from server for predefined time) - ReconnectTimeout = null
  • streaming fake messages - to mimic server response - StreamFakeMessage(...)
  • fail fast for starting, stopping and manual reconnection - throws an exception when the initial connection fails - StartOrFail(), ReconnectOrFail(), StopOrFail()
  • more info in DisconnectionHappened stream - close status, exception that caused disconnection, etc.
  • runtime reconnection canceling from DisconnectionHappened stream - it will stop ongoing reconnection - disconnectionInfo.CancelReconnection = true
  • normal closure - automatically Close client when server sends Close message, could be disabled by DisconnectionHappened stream - disconnectionInfo.CancelClosing= true
  • performance optimizations
    • sending is done through Channels
    • listening now allocates less memory and handles differently single chunk vs multi chunks

Version 3.0

12 Mar 11:59
2cc8803

Choose a tag to compare

Breaking changes

  • return type of MessageReceived observable was changed from string to ResponseMessage

Features

  • support for binary messages
    • a new method Send() and SendInstant() with parameter byte[]
    • MessageReceived observable now streams text or binary data (there is type property to distinguish between them)
  • a new MessageEncoding property to change encoding of sent/received text messages (default is UTF8)

Version 2.0

04 Feb 18:03
52179eb

Choose a tag to compare

Breaking changes

  • dependency to Serilog was removed, switched to logging abstraction (LibLog)

Features

  • a new Name property to distinguish between websocket clients in the logs