0.7.4 - 2023-01-29
- When the
WsMeta::connect
future is dropped, close websocket and unregister callbacks. This avoids some ugly error messages in the console. Thanks to @hamchapman for discovering and solving the issue and @danielhenrymantilla for reviewing the solution.
- tokio-util to 0.7 (dev-dependency)
- send_wrapper to 0.6
0.7.3 - 2021-06-11
- on user demand also make
WsStream
Sync
again.
0.7.2 - 2021-06-26
- Make
WsStream
Send
again.
0.7.1 - 2021-06-11
- Switch to asynchronous-codec.
- Remove external_doc feature for nightly 1.54.
- BREAKING CHANGE: Update to tokio v1, pharos to 0.5 and async_io_stream to 0.3.
- BREAKING CHANGE: Browsers stopped raising SECURITY_ERR when trying to connect to a forbidden port. It now just returns a connection failed, which is indistinguishable from any other network problems, or simply the server not listening on this port. This is an intended change.
- Update to tokio 0.3, will be out of beta when tokio hits 1.0.
- Remove unnecessary
mut
in recent compiler versions. Travis stable on osx is still on 1.44 and will fail until they upgrade. - improve readme
-
BREAKING CHANGE: rename the basic types.
WsStream
is now calledWsMeta
andWsIo
is now calledWsStream
. -
BREAKING CHANGE:
WsStream
no longer implementsAsyncRead
/AsyncWrite
directly, you have to callinto_io()
. -
BREAKING CHANGE: The error type is now renamed to
WsErr
and is an enum directly instead of having an error kind. -
BREAKING CHANGE: Fix:
From<MessageEvent> for WsMessage
has becomeTryFrom
. This is because things actually could go wrong here. -
Implement tokio
AsyncRead
/AsyncWrite
for WsStream (Behind a feature flag). -
delegate implementation of
AsyncRead
/AsyncWrite
/AsyncBufRead
to async_io_stream. This allows sharing the functionality with ws_stream_tungstenite, fleshing it out to always fill and use entire buffers, polling the underlying stream several times if needed. -
only build for default target on docs.rs.
-
exclude unneeded files from package build.
-
remove trace and debug statements.
-
WsMessage
now implementsFrom<Vec<u8>>
andFrom<String>
. -
WsMeta
andWsStream
are nowSend
. You should still only use them in a single thread though. This is fine because WASM has no threads, and is sometimes necessary because all the underlying types of web-sys are!Send
. -
No longer set a close code if the user doesn't set one.
-
Fix: Make sure
WsStream
continues to function correctly if you dropWsMeta
.
- fix version of futures-codec because they didn't bump their major version number after making a breaking change.
- update futures to 0.3.1.
- BREAKING CHANGE: update to pharos 0.4. Observable::observe is now fallible, so that is a breaking change for ws_stream_wasm
- update to futures-codec 0.3
- fix some more errors in the readme
- BREAKING CHANGE: use the new filter feature from pharos, making
NextEvent
andWsEventType
redundant. Those types have been removed from the library. Theobserve
and method offWsStream
now takes apharos::ObserveConfig
to filter event types. Please refer to the documentation of pharos for how to use them. - spell check all docs
- drop dependencies on async_runtime and failure and switch to std::error::Error for error handling
- add a fullstack chat example (still needs documentation and cleanup)
- Fix incorrect link to changelog in readme
- BREAKING CHANGE: Fix: Correctly wake up tasks waiting for a next message if the connection gets closed externally.
This prevents these tasks from hanging indefinitely.
As a consequence,
WsStream::close
now returns aResult
, taking into account that if the connection is already closed, we don't have theCloseEvent
. Instead aWsErr
of kindWsErrKind::ConnectionNotOpen
is returned. - update to async_runtime 0.3