See https://github.com/microsoft/react-native-windows/pull/6079/files/359f9c92e0143b89d3d40efa1a2ad54c06871bf0#r494023291
Type std::vector<std::uint8_t> is used to both store and expose binary data by WebSocketModule.
When the blob type is used, and a segment projection is required (see IWebSocketContentHandler::ResolveMessage), a new vector object is created, copying the immutable data over.
Find a way to create this "slice" vector without copying, but also without modifying interface signatures in IWebSocketResource, or determine the proper storage/transfer type for binary data.
This should accommodate both blob and arrayBuffer binary types.
See https://github.com/microsoft/react-native-windows/pull/6079/files/359f9c92e0143b89d3d40efa1a2ad54c06871bf0#r494023291
Type
std::vector<std::uint8_t>is used to both store and expose binary data byWebSocketModule.When the blob type is used, and a segment projection is required (see
IWebSocketContentHandler::ResolveMessage), a new vector object is created, copying the immutable data over.Find a way to create this "slice" vector without copying, but also without modifying interface signatures in
IWebSocketResource, or determine the proper storage/transfer type for binary data.This should accommodate both
blobandarrayBufferbinary types.