Releases: Marfusios/websocket-client
Releases · Marfusios/websocket-client
Version 5.1
Features
- Usage of RecyclableMemoryStream for processing incoming messages. Thanks @Odonno !
- The new methods available
SendAsText(byte[] | ArraySegment<byte>)- send binary message asTexttype. Use it to avoid double serialization.
Version 5.0
Breaking changes
- removed
LibLogin favor ofMicrosoft.Extensions.Logging. You need to provideILoggerinstance in the constructor parameter. - library no longer targeting
netstandard2.0andnet5
Features
nullable reference typesenabled, you should now get a better info on what can be null
Version 4.0
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
Breaking changes
- return type of
MessageReceivedobservable was changed from string toResponseMessage
Features
- support for binary messages
- a new method
Send()andSendInstant()with parameterbyte[] MessageReceivedobservable now streams text or binary data (there is type property to distinguish between them)
- a new method
- a new
MessageEncodingproperty to change encoding of sent/received text messages (default is UTF8)
Version 2.0
Breaking changes
- dependency to Serilog was removed, switched to logging abstraction (LibLog)
Features
- a new
Nameproperty to distinguish between websocket clients in the logs