File transfer and drag-and-drop messages (v1.5+)
More...
File transfer and drag-and-drop messages (v1.5+)
◆ kMsgDDragInfo
const char* const kMsgDDragInfo |
|
extern |
Drag and drop information.
Message Code: "DDRG" Direction: Primary ↔ Secondary Format: "DDRG%2i%s" Parameters:
- $1: Number of files (2 bytes)
- $2: File paths (string) - Null-separated file paths
Example:
Dragging 2 files
* "DDRG\x00\x02/path/to/file1.txt\x00/path/to/file2.txt\x00"
Sent when a drag-and-drop operation begins. Contains the list of files being dragged. The actual file transfer follows using kMsgDFileTransfer messages.
File Path Format:
- Paths are null-terminated strings
- Multiple paths are concatenated with null separators
- Paths should use forward slashes for compatibility
- See also
- kMsgDFileTransfer
- Since
- Protocol version 1.5
- Deprecated
- File drag and drop is no longer implemented.
◆ kMsgDFileTransfer
const char* const kMsgDFileTransfer |
|
extern |
File transfer data.
Message Code: "DFTR" Direction: Primary ↔ Secondary Format: "DFTR%1i%s" Parameters:
- $1: Transfer mark (1 byte) - Transfer state
- $2: Data (string) - Content depends on mark
Transfer Marks:
- 1 (kDataStart): Data contains file size (8 bytes)
- 2 (kDataChunk): Data contains file content chunk
- 3 (kDataEnd): Transfer complete (data may be empty)
Example Transfer Sequence:
Send 4096 bytes
"DFTR\x01\x00\x00\x00\x00\x00\x00\x10\x00"
"DFTR\x02[1024 bytes of file data]"
"DFTR\x02[1024 bytes of file data]"
"DFTR\x02[1024 bytes of file data]"
"DFTR\x02[1024 bytes of file data]"
"DFTR\x03"
Protocol Flow:
- Sender initiates with kDataStart containing total file size
- Sender sends multiple kDataChunk messages with file content
- Sender concludes with kDataEnd to signal completion
- Receiver can abort by closing connection
- See also
- kMsgDDragInfo, EDataTransfer
- Since
- Protocol version 1.5
- Deprecated
- File drag and drop is no longer implemented.