| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|\
| |
| |
| | |
ActionCable protocol negotiation
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is primarily for backwards compatibility for when
or if the protocol is changed in future versions.
If the server fails to respond with an acceptable
protocol, the client disconnects and disables
the monitor.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
* Introduce a connection coder responsible for encoding Cable messages
as WebSocket messages, defaulting to `ActiveSupport::JSON` and duck-
typing to any object responding to `#encode` and `#decode`.
* Consolidate encoding responsibility to the connection. No longer
explicitly JSON-encode from channels or other sources. Pass Cable
messages as Hashes to `#transmit` and rely on it to encode.
* Introduce stream encoders responsible for decoding pubsub messages.
Preserve the currently raw encoding, but make it easy to use JSON.
Same duck type as the connection encoder.
* Revert recent data normalization/quoting (#23649) which treated
`identifier` and `data` values as nested JSON objects rather than as
opaque JSON-encoded strings. That dealt us an awkward hand where we'd
decode JSON strings… or not, but always encode as JSON. Embedding
JSON object values directly is preferably, no extra JSON encoding,
but that should be a purposeful protocol version change rather than
ambiguously, inadvertently supporting multiple message formats.
|
| | |
|
|/
|
|
|
|
|
|
| |
We'll get `Errno::ECONNRESET` if the client forcibly disconnected.
Just close the socket rather than raising the exception.
Handle other errors in `ClientSocket#write`, too, mirroring the Faye
error handling which swallows all `StandardError` on write.
|
|\
| |
| | |
Support faye-websocket + EventMachine as an option
|
| | |
|
| |
| |
| |
| |
| |
| |
| | |
Fixes #22675
Allow channel identifiers and also data with no backslahes/escaping to be accepted by
the subscription storer.
|
|\ \
| |/
|/|
| | |
ActionCable: Add a "welcome" and "ping" message type
|
| |
| |
| |
| |
| |
| |
| |
| | |
This change makes ping into a message type, which
makes the whole protocol a lot more consistent.
Also fixes hacks on the client side to make this all
work.
|
| | |
|
|/ |
|
|
|
|
| |
If we're deferring one, we should defer the other too.
|
|
|
|
| |
Fixes #23471
|
|\
| |
| | |
Improve Action Cable reconnection reliability
|
| | |
|
|\ \
| |/
|/| |
Full Action Cable documentation read through
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This PR checks all active Action Cable documentation for typos and other
fixes. It aims to make sure that when Rails 5 is released, that the
Action Cable docs are up to snuff with the other documentation included
with Rails.
[ci skip]
|
|/
|
|
|
|
|
|
|
|
|
|
|
| |
Before this commit, the `unsubscribed` callbacks in Action Cable server
side channels were never called. This is because when a WebSocket
"goodbye" message was sent from the client, the Action Cable server
didn't properly clean up after the now closed WebSocket. This means that
memory could possibly skyrocket with this behavior, since part of this
commit is to properly remove closed subscriptions from the global
subscriptions hash. Say you have 10,000 users currently connected, and
then all 10,000 disconnect -- before this patch, Action Cable would
still hold onto information (and Ruby objects!) for all of these now
dead connections.
|
| |
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Also, address the possibility of the listen thread dying and needing to
be respawned. As a bonus, we now defer construction of the thread until
we are first given something to monitor.
|
| | |
|
| | |
|
| | |
|
| | |
|
|/ |
|
|
|
|
| |
(as adapted to use concurrent-ruby / nio4r instead of eventmachine)
|
| |
|
|
|
|
|
|
|
| |
- adapter -> pubsub (re)rename internally
- Change variable names to match method names
- Add EventMachine `~> 1.0` as a runtime dependency of ActionCable
- Refactor dependency loading for adapters
|
| |
|
| |
|
|
|
|
|
| |
This reverts commit d0393fccffc118a5de37654aa222774b66123393, reversing
changes made to 3b7ccadfc1c8dfec61af898167e1300b17f5cf25.
|
|
|
|
|
| |
Found this small omission while reviewing the ActionCable docs.
[Dave Moore]
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This removes 8 runtime gem dependencies from Rails:
```
Using hitimes 1.2.3
Using timers 4.1.1
Using celluloid-essentials 0.20.5
Using celluloid-extras 0.20.5
Using celluloid-fsm 0.20.5
Using celluloid-pool 0.20.5
Using celluloid-supervision 0.20.5
Using celluloid 0.17.2
```
|
| |
|
|\
| |
| | |
Remove warnings from actioncable test
|
| |
| |
| |
| | |
Warnings coming from code and test are removed
|
|/ |
|
|
|