# Websocket client in Julia (how to)

**URL:** <https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788>\
**Category:** General Usage\
**Tags:** question\
**Created:** [May 18, 2017, 1:56pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788 "2017-05-18T13:56:26Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![hgeorgako](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hgeorgako/32/5518_2.png) [@hgeorgako](https://discourse.julialang.org/u/hgeorgako)\
**Post date:** [May 18, 2017, 1:56pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/1 "2017-05-18T13:56:26Z")

</div>

Websockets.jl seems to be a server side implementation only. On the client side, I’ve found the following DandelionWebSockets.jl. Is this the recommended way to listen and work with web-sockets in Julia? If not, what are the alternatives? I want to fill a Julia array with certain parsed text objects every time a message is pushed through the web-socket. Any example code on how to do this would be appreciated.

---

<div class="post-metadata">

**Author:** ![erikedin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikedin/32/9281_2.png) [@erikedin](https://discourse.julialang.org/u/erikedin)\
**Post date:** [August 26, 2017, 10:46am UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/2 "2017-08-26T10:46:01Z")

</div>

Hi!

I’m the original author of DandelionWebSockets.jl. It’s not under active development, but a few volunteers have been making an effort to update it to Julia 0.6. I’m hoping someone will fork it, and keep it under active maintenance, but I wouldn’t count on DandelionWebSockets.jl being actively maintained right now.

Erik

---

<div class="post-metadata">

**Author:** ![erikedin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikedin/32/9281_2.png) [@erikedin](https://discourse.julialang.org/u/erikedin)\
**Post date:** [February 19, 2018, 10:29am UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/3 "2018-02-19T10:29:51Z")

</div>

Quick update: DandelionWebSockets is again under active development and maintenance.

---

<div class="post-metadata">

**Author:** ![Christian\_Rorvik](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/christian_rorvik/32/965_2.png) [@Christian\_Rorvik](https://discourse.julialang.org/u/Christian_Rorvik)\
**Post date:** [February 19, 2018, 11:44am UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/4 "2018-02-19T11:44:01Z")

</div>

Very cool to hear. Do you have any plans to merge this effort with JuliaWeb’s Websockets.jl?

---

<div class="post-metadata">

**Author:** ![erikedin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erikedin/32/9281_2.png) [@erikedin](https://discourse.julialang.org/u/erikedin)\
**Post date:** [February 19, 2018, 12:47pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/5 "2018-02-19T12:47:11Z")

</div>

It’s not something we’ve discussed, but it’s a definite possibility. Right now I’m focusing on covering as much as possible of the specification.

---

<div class="post-metadata">

**Author:** ![anon67531922](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon67531922](https://discourse.julialang.org/u/anon67531922)\
**Post date:** [February 19, 2018, 12:55pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/6 "2018-02-19T12:55:24Z")

</div>

Btw, HTTP.jl now has capability to operate as both a WebSocket client and a WebSocket server.

[https://github.com/JuliaWeb/HTTP.jl/blob/master/test/WebSockets.jl](https://github.com/JuliaWeb/HTTP.jl/blob/master/test/WebSockets.jl)

---

<div class="post-metadata">

**Author:** ![tamasgal](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamasgal/32/27946_2.png) [@tamasgal](https://discourse.julialang.org/u/tamasgal)\
**Post date:** [February 19, 2018, 1:55pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/7 "2018-02-19T13:55:02Z")

</div>

Wow, HTTP also have very few dependencies as I can see, nice!

---

<div class="post-metadata">

**Author:** ![hustf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hustf/32/2374_2.png) [@hustf](https://discourse.julialang.org/u/hustf)\
**Post date:** [June 12, 2018, 3:59pm UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/8 "2018-06-12T15:59:21Z")

</div>

We now have three options for client side websockets, which can only be good:

- HTTP.jl
- DandelionWebSockets
- 0.5.0 of [Websockets.jl](https://github.com/juliaweb/WebSockets.jl/).

Thanks to a pull request from EricForgy and Sam o Connor, WebSockets.jl can connect through either Http.jl or HttpServer.jl.

---

<div class="post-metadata">

**Author:** ![anon67531922](https://avatars.discourse-cdn.com/v4/letter/a/48db29/32.png) [@anon67531922](https://discourse.julialang.org/u/anon67531922)\
**Post date:** [June 23, 2018, 5:36am UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/9 "2018-06-23T05:36:46Z")

</div>

Great work @hustf getting that POC into shape 💪

I don’t know if everyone agrees quite yet, but a few of us hope to see a general migration away from HttpServer.jl to HTTP.jl so this helps people relying on WebSockets make the switch.

---

<div class="post-metadata">

**Author:** ![hustf](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/hustf/32/2374_2.png) [@hustf](https://discourse.julialang.org/u/hustf)\
**Post date:** [June 23, 2018, 10:25am UTC](https://discourse.julialang.org/t/websocket-client-in-julia-how-to/3788/10 "2018-06-23T10:25:48Z")

</div>

Thanks, Eric. I havent figured out how to do logging properly yet with http.jl, so I kind of hope somebody will merge the necessary prs on the httpserver side of things too. Httpserver will never become a full fledged server without some brave changes that are possible with less consercatism, but it is still useful for local work.

For example, I hope to test driving Simmetri [https://support.simmetri.com/hc/en-us](https://support.simmetri.com/hc/en-us) and Lua through websockets. If I get that far, the aerodynamic force calculation will be from Julia while the rest is Simmetri.
