Nikos Athanasiou c2d497abc5
Avoid returning references that are mutex protected (#297)
* Fix unsafe calls and safeguard WebSocketMessage from being called w/
temporaries

* Use unnamed namespace to express internal linkage

* Avoid returning references that are mutex protected
Motivation for this MR

The antipattern of returning references to mutex protected members was
removed. Since a caller can hold the reference it would make all class
level locking meaningless.

Instead values are returned. The IXWebSocketPerMessageDeflateOptions
class was shrunk by 7 bytes (1 padding + 2*3) after changing the int
members to the used uint8_t; side effects of that were handled.

An inefficient "string -> int" was replaced by standard library. As
seen here http://coliru.stacked-crooked.com/a/46b5990bafb9c626 this
gives an order of magnitude better performance.
2021-06-05 11:23:18 -07:00
..
2020-11-12 13:07:31 -08:00
2020-03-24 12:48:55 -07:00
2021-03-23 21:52:49 -07:00
2020-04-24 15:34:00 -07:00
2020-11-15 21:09:58 -08:00
2020-07-08 10:39:46 -07:00
2019-05-30 08:46:50 -07:00
2019-08-30 12:50:56 -07:00
2020-04-24 15:34:00 -07:00
2020-11-15 21:09:58 -08:00
2020-11-15 21:09:58 -08:00
2020-04-16 11:58:06 -07:00
2021-04-19 09:25:06 -07:00