Skip to content

Releases: Marfusios/websocket-client

Version 5.1

15 Feb 15:57
fb57ec5
Compare
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
Compare
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
Compare
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
Compare
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
Compare
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