housleyjk / ws-rs

Lightweight, event-driven WebSockets for Rust.
MIT License
1.46k stars 219 forks source link

Limit in/out buffer growth with a Vec<u8> wrapper #328

Open maciejhirsz opened 3 years ago

maciejhirsz commented 3 years ago

This PR introduces a CappedBuffer wrapper around a Vec<u8> which effectively enforces buffer capacity limits. Exceeding capacity limits will force a disconnect.

There are changes to the settings involved, so this is a breaking change.

Fixes #291.

bkchr commented 3 years ago

CC @Eijebong :)

@Eijebong would it maybe be possible to add someone from our company as maintainer?

Eijebong commented 3 years ago

Sorry, I had notifications muted for this repository. I don't have time nor motivation for open source these days but I'd be happy to add someone as maintainer

bkchr commented 3 years ago

Sorry, I had notifications muted for this repository. I don't have time nor motivation for open source these days but I'd be happy to add someone as maintainer

Hey, no problem. It would be nice if you could invite @maciejhirsz to the repo and on crates.io :)

Eijebong commented 3 years ago

I actually don't have the rights to do so

@housleyjk if you could do it, that'd be nice

palfrey commented 2 years ago

@housleyjk Any thoughts on this?