mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-22 15:11:31 +00:00
[idd] clipboard: pipeline helper channel
Publish ordered four-record prefixes through the Helper mapping and ring once per accepted burst. Wake blocked producers when the peer returns credits while retaining the bounded polling fallback. Move received payload ownership into manager work items and place remote file-read data directly into the waiting caller’s bounded output buffer. This removes avoidable 256 KiB copies without changing record ordering, timeouts, cancellation, or reset semantics.
This commit is contained in:
@@ -326,7 +326,7 @@ void CClipboardHub::ClipboardState(bool available, uint64_t epoch)
|
||||
}
|
||||
|
||||
ClipboardChannelResult CClipboardHub::ClipboardRecord(
|
||||
const KVMFRClipboardMessage& record, const uint8_t * data)
|
||||
const KVMFRClipboardMessage& record, std::vector<uint8_t>&& data)
|
||||
{
|
||||
if (!ValidHelperDirection(record))
|
||||
return ClipboardChannelResult::FAILED;
|
||||
@@ -347,7 +347,8 @@ ClipboardChannelResult CClipboardHub::ClipboardRecord(
|
||||
KVMFRClipboardMessage stamped = record;
|
||||
stamped.generation = generation;
|
||||
const ClipboardChannelResult result =
|
||||
source->SendClipboard(stamped, data);
|
||||
source->SendClipboard(stamped,
|
||||
data.empty() ? nullptr : data.data());
|
||||
if (result != ClipboardChannelResult::FAILED)
|
||||
return result;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user