Repository navigation
Phase 7 SP3: làn bulk qua Bluetooth (kênh 0x02) - #20
Open
xuandung38 wants to merge 9 commits into
Open
xuandung38 wants to merge 9 commits into
xuandung38 wants to merge 9 commits into
Conversation
The clipboard engine now picks EnvelopeLane (CONTROL/BULK) on every send path for chunked transfers: clipboard/push with transfer, every clipboard/chunk, clipboard/cancel from either side, and the matching ack/clipboard/conflict all travel on channel 0x02 instead of 0x01 when the session is over Bluetooth (ignored on LAN/relay, single lane). BluetoothPeerSocket implements BulkLaneSocket.sendBulk, gated by a Semaphore(BT_BULK_QUEUED=2) that releases once the scheduler reports a bulk envelope's last fragment fully written; a new BluetoothBulkLaneReassembler reassembles channel 0x02 in its own buffer, separate from the long control lane's. BtTransportFrame.decode closes the link when long=1 is set on channel 0x02 (bulk rule 5). A duplicate request's kept ack (0.5.1 rule 2) now resends on the lane it was first sent on, tracked through ReplayWindow/SessionCipher. Until Wi-Fi Direct (A7.5) ships, every Bluetooth transfer runs on the bulk lane regardless of size.
BluetoothBulkLane now holds the BT_BULK_QUEUED gate and the channel 0x02 reassembler; BluetoothLinkScheduler.poll keeps short > long > bulk and the BT_BULK_INFLIGHT cap in a single expression. ClipReceiver derives the reply lane from the push, and the SMS test harness takes the lane argument added to EnvelopeSender. Clears detekt and ktlint on check.
Over a Bluetooth session an image of at least BULK_DIRECT_MIN shows sending and receiving progress flagged for the Bluetooth note (CLIP-03 fields 2 and 10); below it, and on LAN under 1 MiB, nothing shows.
TransferProgress carries overBluetooth so the notifier can add the CLIP-03 field 10 line; LAN and relay keep the 1 MiB threshold.
Over the Bluetooth link the progress notification carries the CLIP-03 field 10 line under the percent, in English and Vietnamese; LAN progress has none.
When a transfer runs over the Bluetooth link the progress notification expands to the percent line followed by clipboard.bulk_bluetooth_sending or _receiving (CLIP-03 field 10); LAN and relay progress is unchanged.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Làn bulk qua Bluetooth (kênh 0x02) cho ảnh và clipboard lớn khi không có mạng: contract spec 0.4.7, tiến độ từ 128 KiB, ghi chú Bluetooth trên tiến độ. Thứ tự merge: shared → android → apple → hub. Merge bằng 'Create a merge commit'.