You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I personally want to get a somewhat more aligned buffer for received binary messages somehow, in order to do some in-place dirty dirty things. and I guess there should be some real world use cases. I wonder if such feature can be added, or if there could be some workarounds.
An alternative option, as far as I've considered, is to utilize the allocator_api but it's still unstable.
The text was updated successfully, but these errors were encountered:
chuigda
changed the title
Consider supporting types other than Vec<u8> for binary Messages
Consider supporting buffer types other than Vec<u8> for binary Messages
May 6, 2023
It seems like it's having a broad overlap with #96 and the corresponding PR, i.e. we thought about changing the underlying type for the Message to not enforce owned data when calling write_message(). This won't quite work with any data type that you've mentioned ("in place dirty dirty things" 😉 ).
Or, to be more precise, there have been discussions around splitting the sans I/O part of the library into tungstenite-core that is generic over the data (read accepts a buffer, write accepts a buffer also, no I/O on streams) and then make tungstenite and tokio-tungstenite wrappers around it. But we have not come up with a plan (though PRs or changes in this direction are welcome).
I personally want to get a somewhat more aligned buffer for received binary messages somehow, in order to do some in-place dirty dirty things. and I guess there should be some real world use cases. I wonder if such feature can be added, or if there could be some workarounds.
An alternative option, as far as I've considered, is to utilize the allocator_api but it's still unstable.
The text was updated successfully, but these errors were encountered: