This repository was archived by the owner on Feb 7, 2024. It is now read-only.
[3.0] Initial commit for Amphp Websockets. #756
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I know you're making a 2.0 and it has been having dozens of betas. Before you flip your tables, just hear me out: this is a rewrite of Laravel Websockets using Amphp.
You can test this by simply using
websockets:serve
, connecting directly, and issuing an "Hello World".There was some major refactoring in the most important areas, but there is still work to do to make separate the WebSocket implementation for the developer, from the actual Server doing the heavy lifting. Talking about pending things,
Todo:
JsonStore
statistics for development, fresh at each Server Start.WebsocketClient
contract to allow swapping between Amphp, React, or Octane.WebsocketServer
contract to allow swapping between Amphp, React, or Octane.AsyncRedisClient
contract to allow swapping between Amphp, React, or Octane.LoopInterface
contract to allow swapping between Amphp, React or Octane.MessageInterface
contract to allow swapping between Amphp, React or Octane.Promise::onResolve()
.appId
as the application name in snake_case.I think this package may have a good chance to be THE Websocket package that can work on major concurrency frameworks (Amphp, React, soon Octane) without having marry just one dependency.
PD: For Octane, Websockets must be enabled on RR 2.0, and we're still waiting.