- Allow passing socket_opts to the underlying websocket client. This is required to pass additional ssl options to the socket, which might be useful in some cases. Thanks @matt-mazzucato
- Allow passing options to serializer for decoding based on the opcode (
:text
or:binary
). Thanks @cabol
This library has been retired. It is no longer maintained. It will not receive security fixes or updates.
For more information, please read this issue: #57
- Fixed text encoding bug when upgrading Phoenix to 1.5.7 (issue #54). Thanks @vladra
- Allow passing
:extra_headers
and:ssl_verify
options to websocket_client. Thanks @albertored
- Fix timeout typespec in GenSocketClient call function. Thanks @matt-mazzucato
- Add support for optional terminate callback
- The provided Json serializer uses Jason rather than Poison. This is a breaking change and the cause of the major version bump.
- Minor fixes to doc and tests
- Tests against more recent Elixir (1.10) and Erlang (22) versions
- Dropping support for Elixir versions prior to 1.8 and Erlang prior to 22.
- Uses credo only in
:dev
and:test
, so it's not treated as a transitive dependency in client projects.
- Added
Phoenix.Channels.GenSocketClient.joined?/1
- Added support for changing url and/or query parameters when reconnecting
- requires Elixir 1.5 or greater
- supports only Phoenix channels protocol 2.0 (so the library works only with Phoenix 1.3+ on sockets which are powered by 2.0 serializers)
- takes URL parameters separately (see spec for
Phoenix.Channels.GenSocketClient.init/1
andPhoenix.Channels.GenSocketClient.TestSocket.start_link/1
) - properly enforces optional dependencies (Poison and websocket_client)
- Serialization failures are propagated as tuples instead of exceptions
- Changed the internals to simplify creating a large number of open connections.
- Added
call/3
to support synchronous calls to the socket process. - The behavior now mandates the
handle_call/4
callback function.