Hey! I haven't worked with Gleam in a long time, and now i want to get back with a little project. I remember there was this websocket library called nerf iirc, but it had some quirks that made some connections not possible... And sadly i saw that it hasn't been updated in a long time :( Are there any news or other websocket librarys i could use?
#Any good websocket library?
1 messages · Page 1 of 1 (latest)
are you looking for a websocket client or server?
ah probably client if you were looking at nerf
Sorry for not being specific, i'm talking about a client yeah
seems theres a PR to nerf to bring it up to date but its blocked on some stuff. it probably wouldn't be so much work to do, i think your best bet would be to copy the library into your project for now 😵
i think we are sorely lacking on both http and websocket clients at the moment, got a quite a few servers
i'd recommend creating a new folder in your project called vendor and cloning the nerf repo into there. then in your project's gleam.toml under [dependencies] add:
nerf = { path = "./vendor/nerf" }
if louis gets round to updating the package it should be as easy as removing that line and doing glea add nerf in the future 🙂
Well http clients seem to be good, i mean i also didn't use them much, but hackney or httpc are two i saw that provide most of the stuff you'd need, but ye the websocket part is sad for me in that case, but i understand that ws clienst aren't that important compared to the other stuff
Great idea, i'll try that out!
Thanks so much
if you run into any trouble getting the source up to date im sure folks here would be happy to help (: and you could always PR it back when you're done ^.^
i think most of the breaks will be just some syntax stuff
Alright, i will have a look at that tomorrow, thanks for the quick help, have a good one and cya 🫡
We don’t have any half decent websockets libraries I’m afraid
Nerd doesn’t handle https
I personally wouldn’t want to use it
There may be an Elixir one that’s better
It’s very odd that we don’t have one to be honest
No worries, i just need something to play around with stuff, i think it might work. Otherwise I'd have to have a look for ws clients from other languages, because i never so far touched Elixir or Erlang
FWIW a while ago I forked nerf to add https support https://hexdocs.pm/gleam_gun/index.html but then it got out of date with the new gleam versions. Now having the same issue you do, lacking a ws client. So far I ended up adding WebSockex through elixir to my gleam project, but not very happy with this solution. Would be great to know what would you end up doing!
Gleam bindings to gun, the HTTP/1.1, HTTP/2 and Websocket client
Oooooh you made it verify tls?
Small bump. What's my best bet if I want to use Gleam on the frontend and receive events over a websocket? The ones mentioned here seems to be focused on the server/erlang side of things?