Releases: elixir-mint/mint_web_socket
v1.0.3
v1.0.2
What's Changed
- Use erlef/setup-beam by @kianmeng in #25
- Remove dollar sign in command by @kianmeng in #26
- Add Dialyxir and fix all warnings by @rkallos in #27
- Fix typo in
Mint.WebSocket.new()
function doc by @mruoss in #28 - Align WebSocket.Frame.encode/2 spec with WebSocket.encode/2 by @ColaCheng in #29
New Contributors
- @kianmeng made their first contribution in #25
- @rkallos made their first contribution in #27
- @mruoss made their first contribution in #28
- @ColaCheng made their first contribution in #29
Full Changelog: v1.0.1...v1.0.2
v1.0.1
What's Changed
- Don't crash when a message is split in the middle of the payload length field. by @JWalker1995 in #22
New Contributors
- @JWalker1995 made their first contribution in #22
Full Changelog: v1.0.0...v1.0.1
Release v1.0.0
v1.0.0 has been released!
There are no code-wise changes. Instead this release marks stability: Mint.WebSocket
will release a v2.0.0 for any backwards-incompatible changes.
Release v0.3.0
0.3.0 - 2022-02-27
Changed
- Failure to upgrade now gives a
Mint.WebSocket.UpgradeFailureError
as the error when a server returns a status code other than 101 for
HTTP/1 or a status code outside the range 200..299 range for HTTP/2.
Release v0.2.0
0.2.0 - 2022-02-17
This release is a breaking change from the 0.1.0 series. This update removes
all instances where Mint.WebSocket would access opaque t:Mint.HTTP.t/0
fields
or call private functions within Mint.HTTP1
, so now Mint.WebSocket should be
more compatible with future changes to Mint.
Upgrade guide
First, add the scheme
argument to calls to Mint.WebSocket.upgrade/5
.
For connections formed with Mint.HTTP.connect(:http, ..)
, use the :ws
scheme. For Mint.HTTP.connect(:https, ..)
, use :wss
.
- Mint.WebSocket.upgrade(conn, path, headers)
+ Mint.WebSocket.upgrade(scheme, conn, path, headers)
Then replace calls to Mint.HTTP.stream/2
and/or Mint.HTTP.recv/3
and
Mint.HTTP.stream_request_body/3
with the new Mint.WebSocket
wrappers.
This is safe to do even when these functions are being used to send and
receive data in normal HTTP requests: the functionality only changes when
the connection is an established HTTP/1 WebSocket.
Added
- Added
Mint.WebSocket.stream/2
which wrapsMint.HTTP.stream/2
- Added
Mint.WebSocket.recv/3
which wrapsMint.HTTP.recv/3
- Added
Mint.WebSocket.stream_request_body/3
which wrapsMint.HTTP.stream_request_body/3
Changed
- Changed function signature of
Mint.Websocket.upgrade/5
to accept the
WebSocket's scheme (:ws
or:wss
) as the first argument - Added an optional
opts
argument toMint.WebSocket.new/5
to control
active vs. passive mode on the socket - Restricted compatible Mint versions to
~> 1.4
Mint.WebSocket
now usesMint.HTTP.get_protocol/1
which was
introduced in1.4.0
.
Release v0.1.4
fix typespec for new/4
Release v0.1.3
use :erlang.bor/2 instead of Bitwise.bor/2
Release v0.1.2
fix: use :erlang.bxor/2 instead of Bitwise.bxor/2 (#18)
Initial release: v0.1.0
v0.1.0 is the initial release for Mint.WebSocket
It contains the basic support for
- HTTP/1.1
- HTTP/2
- extensions
Mint.WebSocket should be considered experimental at this version.