satom99 / phx_raws Goto Github PK
View Code? Open in Web Editor NEWRaw websocket server on top of Phoenix.
Home Page: https://elixirforum.com/t/9362
Raw websocket server on top of Phoenix.
Home Page: https://elixirforum.com/t/9362
Hi first of all thanks for creating this, I was quite shocked to see that WebSockets are not supported in Phoenix and relieved to find this :D
That said for those of us less versed in Phoenix it would be really awesome to add a line or two how to add this to the routes.
Specifically things like def handle(:text, message, _state) do
imply it is a textural format, where websockets are a binary stream and it should probably be exposed as such. Probably just :input
or something would be more properly descriptive of the message.
As well as returning just a state
as a return option from handle
is ambiguous with the other options and should be properly tagged, probably by following the GenServer standard style for not returning something, same with the other formats, they should probably all follow the style of GenServer's.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.