satom99

satom99

In a Phoenix-based project, it is rather tedious to get a raw cowboy websocket working manually, as one is required to set-up a custom dispatch as well as to handle the socket itself. Therefore, after a few hours of testing and reading through the source code, I have come up with a solution that follows Phoenix’ semantics nicely.

Repository: GitHub - satom99/phx_raws: Raw websocket server on top of Phoenix. · GitHub

Contributions are more than welcome, especially to keep it updated and prevent it from breaking as Phoenix continues to evolve.

Showing Posts 1 to 2

Nicd

Nicd

Nice! People have been asking for this many times. Maybe the handle callback should be named handle_in to match Phoenix Channel API?

satom99

satom99 OP

I think handle suits better as a generic name, as it does receive both incoming data and a few events. Plus switching to _in would only make sense if there was an _out counterpart, which is not the case.

Would like to hear more comments on this :slight_smile:

On events (i.e. :closed), I thought adding a separate callback for them would be a bit overkill - which is why they’re dispatched through the same generic callback, what do you think?

— All posts loaded —

Where Next? Top

Trending in Announcing Top

GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
261 13183 112
New
achempion
Hi, I would like to tell about my initiative to further maintain and develop Waffle project which is the fork of Arc library. The progre...
New
mudasobwa
I fully migrated to my own harness from Anthropic/Gemini and I think it’s time to share it. Welcome DSH, the DeepSeek Harness, fully writ...
New
kip
Localize is the next generation localisation library for Elixir. Think of it as ex_cldr version 3.0. The first version will be released ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
mcass19
ExRatatui lets you cook up rich terminal UIs in Elixir, powered by Rust’s ratatui via Rustler NIFs. Build interactive terminal applicatio...
New
charlenopires
Hi everyone :waving_hand: I’ve been working on PhiaUI, an open-source UI component library for Phoenix LiveView, and I wanted to share i...
New

Other Trending Topics Top

OndrejValenta
(I just needed to vent somewhere and LinkedIn is full of hope, or hype, I’m not sure which exactly) AI dream has many faces, but general...
New
AstonJ
With advancements in AI gathering pace and set to increasingly accelerate, perhaps it’s worth having an annual thread on the topic - feel...
New
bartblast
If you haven’t tried Hologram yet, what’s stopped you? Here’s why I’m asking. Building a framework turns out to be two jobs, the framewo...
New
mat-hek
Popcorn, the library that runs Elixir code in the browser, is now stable :popcorn: This is possible because it now builds on a very stab...
New
sntran
In my third year of college, around 2010, I found Erlang. A few years later, I found Elixir. I liked the ideas at once: many small proces...
New
gtcode
I’ve been tinkering with Lynx (by José) via hold_ledger. I used AI to write the code, a separate specification, the tests, and the Lean p...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews