per-message compression options

fix #226, #227
This commit is contained in:
alandefreitas authored and Klemens committed 2022-10-03 09:25:31 +08:00
1 parent 677a3e0179
commit bd69638e9d
9 files changed
+178 -14

No files matched your search

@@ -304,6 +304,22 @@ text() const
return impl_->wr_opcode == detail::opcode::text;
}
template<class NextLayer, bool deflateSupported>
void
stream<NextLayer, deflateSupported>::
compress(bool value)
{
impl_->wr_compress_opt = value;
}
template<class NextLayer, bool deflateSupported>
bool
stream<NextLayer, deflateSupported>::
compress() const
{
return impl_->wr_compress_opt;
}
//------------------------------------------------------------------------------
// _Fail the WebSocket Connection_