# Need HTTP.WebSockets documentation

**URL:** <https://discourse.julialang.org/t/need-http-websockets-documentation/39237>\
**Category:** Web Stack\
**Created:** [May 10, 2020, 6:27pm UTC](https://discourse.julialang.org/t/need-http-websockets-documentation/39237 "2020-05-10T18:27:31Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Laszlo\_Nagy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/laszlo_nagy/32/14565_2.png) [@Laszlo\_Nagy](https://discourse.julialang.org/u/Laszlo_Nagy)\
**Post date:** [May 10, 2020, 6:27pm UTC](https://discourse.julialang.org/t/need-http-websockets-documentation/39237/1 "2020-05-10T18:27:31Z")

</div>

Hello, I’m trying to do something useful with websockets. I’m unable to find its documentation.

```julia
julia> import HTTP.WebSockets

help?> HTTP.WebSockets
  No documentation found.

  No docstring found for module HTTP.WebSockets.

```

Not even a docstring. ☹

There two examples here [GitHub - JuliaWeb/HTTP.jl: HTTP for Julia](https://github.com/JuliaWeb/HTTP.jl#websocket-examples) - but they don’t really explain anything. For example, websockets use so called `messages`, as defined in RFC6455. But the example does not use that concept. It just reads from the socket (as a stream with `readavailable`) and writes it as a stream. After examinig its source code, it turned out that readavailable reads whole frames.

> <https://github.com/JuliaWeb/HTTP.jl/blob/master/src/WebSockets.jl#L239>

Can I assume, that `readavailable` will always return whole messages, and never fragments?

Also, it seems that there is no upper limit on the message size, and WebSockets.jl simply extends a read buffer (ws.rxpayload) when the message is longer. Since the payload is stored in memory, it would be easy to fill up the server’s memory with a huge message. Is this a known problem? Or maybe I’m not noticing something.
