ANN: Salvo - An experimental websocket client and server

Hi all,

I just released Salvo, which contains both a websocker server and client. The server is based on cowboy and the client on gun.

The interesting part (IMHO) is that both the client and server have an Enumerable and Collectable implementation, so they play nice with streams. Here’s an example that pushes a file from the server to the client:

# node 1
iex> s =!("/websocket", 8080)

# node 2
iex> c =!("")
iex> Stream.into(c,!("README.bak")) |>

# node 1
iex>!("") |> Stream.into(s) |>

# Tell the client to close it's connection
iex> Salvo.Server.send!(s, :close)

I wrote this library in a day, because I think websockets and Elixir streams could be an nice match, but we’ll see if that’s indeed the case. Don’t expect to use this for building the next WhatsApp, as this is just an experiment without any real world usage :slight_smile: However, I can see it being useful for ad hoc tasks and simple utilities.

I’d love to hear your opinion about the usefulness of this little library!