Websocket.Client v4.0 Release Notes
Release Date: 2019-12-05 // over 3 years ago-
๐ฅ 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
- โฑ timeout properties changed from milliseconds (int) to
Previous changes from v3.0
-
๐ฅ Breaking changes
- return type of
MessageReceived
observable was changed from string toResponseMessage
๐ Features
- ๐ support for binary messages
- a new method
Send()
andSendInstant()
with parameterbyte[]
MessageReceived
observable now streams text or binary data (there is type property to distinguish between them)
- a new method
- 0๏ธโฃ a new
MessageEncoding
property to change encoding of sent/received text messages (default is UTF8)
- return type of