Protocol Version 3

Get Text

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Text method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 01 Client requests the get text method
1 01 Server accepts the request
Get text 8 00 00 00 00 00 00 00 10 Server sends the length of copied text as 16 bytes as a 64-bit signed integer in big-endian format. 0000000000000010 in hexadecimal is 16 in decimal.
16 48 65 6C 6C 6F 20 43 6C 69 70 53 68 61 72 65 21 Server sends the text copied to the clipboard, which is 16 bytes long when encoded in UTF-8. The text is "Hello ClipShare!" (without quotes) when decoded.
Communication ends and connection closes

Get Text (no data)

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Text method with no data in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 01 Client requests the get text method
1 02 Server indicates that there is no text copied to the clipboard (No data)
Communication ends and connection closes

Send Text

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Send Text method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 02 Client requests the send text method
1 01 Server accepts the request
Send text 8 00 00 00 00 00 00 00 10 Client sends the length of copied text as 16 bytes as a 64-bit signed integer in big-endian format. 0000000000000010 in hexadecimal is 16 in decimal.
16 48 65 6C 6C 6F 20 43 6C 69 70 53 68 61 72 65 21 Client sends the text copied to the clipboard, which is 16 bytes long when encoded in UTF-8. The text is "Hello ClipShare!" (without quotes) when decoded.
Communication ends and connection closes

Get Files

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Files method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 03 Client requests the get files method
1 01 Server accepts the request
Get files File count 8 00 00 00 00 00 00 00 06 Server sends the number of files as 6 in a 64-bit signed integer in big-endian format.
First file 8 00 00 00 00 00 00 00 0E Server sends the length of the first file name as 14 bytes as a 64-bit signed integer in big-endian format. 000000000000000E in hexadecimal is 14 in decimal.
14 66 69 72 73 74 5F 66 69 6C 65 2E 74 78 74 Server sends the name of the first file, which is 14 bytes long when encoded in UTF-8. The file name is "first_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 25 Server sends the size of the first file as 37 bytes as a 64-bit signed integer in big-endian format. 0000000000000025 in hexadecimal is 37 in decimal.
37 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 66 69 72 73 74 20 66 69 6C 65 Server sends the content of the first file, which is 37 bytes in size. The file content is "this is the content of the first file" (without quotes).
Second file 8 00 00 00 00 00 00 00 17 Server sends the length of the second file name as 23 bytes as a 64-bit signed integer in big-endian format. 0000000000000017 in hexadecimal is 23 in decimal.
23 66 6F 6C 64 65 72 31 2F 73 65 63 6F 6E 64 5F 66 69 6C 65 2E 74 78 74 Server sends the name of the second file, which is 23 bytes long when encoded in UTF-8. The file name is "folder1/second_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 26 Server sends the size of the second file as 38 bytes as a 64-bit signed integer in big-endian format. 0000000000000026 in hexadecimal is 38 in decimal.
38 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 73 65 63 6F 6E 64 20 66 69 6C 65 Server sends the content of the second file, which is 38 bytes in size. The file content is "this is the content of the second file" (without quotes).
Third file 8 00 00 00 00 00 00 00 16 Server sends the length of the third file name as 22 bytes as a 64-bit signed integer in big-endian format. 0000000000000016 in hexadecimal is 22 in decimal.
22 66 6F 6C 64 65 72 32 2F 74 68 69 72 64 5F 66 69 6C 65 2E 74 78 74 Server sends the name of the third file, which is 22 bytes long when encoded in UTF-8. The file name is "folder2/third_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 25 Server sends the size of the third file as 37 bytes as a 64-bit signed integer in big-endian format. 0000000000000025 in hexadecimal is 37 in decimal.
37 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 74 68 69 72 64 20 66 69 6C 65 Server sends the content of the third file, which is 37 bytes in size. The file content is "this is the content of the third file" (without quotes).
Fourth file 8 00 00 00 00 00 00 00 21 Server sends the length of the fourth file name as 33 bytes as a 64-bit signed integer in big-endian format. 0000000000000021 in hexadecimal is 33 in decimal.
33 66 6F 6C 64 65 72 32 2F 73 75 62 66 6F 6C 64 65 72 2F 66 6F 75 72 74 68 5F 66 69 6C 65 2E 74 78 74 Server sends the name of the fourth file, which is 33 bytes long when encoded in UTF-8. The file name is "folder2/subfolder/fourth_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 26 Server sends the size of the fourth file as 38 bytes as a 64-bit signed integer in big-endian format. 0000000000000026 in hexadecimal is 38 in decimal.
38 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 66 6F 75 72 74 68 20 66 69 6C 65 Server sends the content of the fourth file, which is 38 bytes in size. The file content is "this is the content of the fourth file" (without quotes).
Fifth file 8 00 00 00 00 00 00 00 0D Server sends the length of the fifth file name (which is an empty directory) as 13 bytes as a 64-bit signed integer in big-endian format. 000000000000000D in hexadecimal is 13 in decimal.
13 66 6F 6C 64 65 72 32 2F 65 6D 70 74 79 Server sends the name of the fifth file, which is 13 bytes long when encoded in UTF-8. The file name is "folder2/empty" (without quotes) when decoded.
8 FF FF FF FF FF FF FF FF Server sends the size of the fifth file (empty directory) as -1 as a 64-bit signed integer in big-endian format. FFFFFFFFFFFFFFFF in hexadecimal is -1 in 64-bit signed decimal.
Sixth file 8 00 00 00 00 00 00 00 07 Server sends the length of the sixth file name (which is an empty directory) as 7 bytes as a 64-bit signed integer in big-endian format. 0000000000000007 in hexadecimal is 7 in decimal.
7 65 6D 70 74 79 32 2F Server sends the name of the sixth file, which is 7 bytes long when encoded in UTF-8. The file name is "empty2/" (without quotes) when decoded. This file name includes the optional trailing '/' for empty directories.
8 FF FF FF FF FF FF FF FF Server sends the size of the sixth file (empty directory) as -1 as a 64-bit signed integer in big-endian format. FFFFFFFFFFFFFFFF in hexadecimal is -1 in 64-bit signed decimal.
Communication ends and connection closes

The files transfered are in the following structure,

.
├── folder1/
│   └── second_file.txt
├── folder2/
│   ├── subfolder/
│   │   └── fourth_file.txt
│   ├── empty/
│   └── third_file.txt
├── empty2/
└── first_file.txt
        

Get Files (no data)

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Files method with no data in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 03 Client requests the get files method
1 02 Server indicates that there are no files copied (No data)
Communication ends and connection closes

Send Files

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Send Files method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 04 Client requests the send files method
1 01 Server accepts the request
Get files File count 8 00 00 00 00 00 00 00 04 Client sends the number of files as 4 in a 64-bit signed integer in big-endian format.
First file 8 00 00 00 00 00 00 00 0E Client sends the length of the first file name as 14 bytes as a 64-bit signed integer in big-endian format. 000000000000000E in hexadecimal is 14 in decimal.
14 66 69 72 73 74 5F 66 69 6C 65 2E 74 78 74 Client sends the name of the first file, which is 14 bytes long when encoded in UTF-8. The file name is "first_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 25 Client sends the size of the first file as 37 bytes as a 64-bit signed integer in big-endian format. 0000000000000025 in hexadecimal is 37 in decimal.
37 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 66 69 72 73 74 20 66 69 6C 65 Client sends the content of the first file, which is 37 bytes in size. The file content is "this is the content of the first file" (without quotes).
Second file 8 00 00 00 00 00 00 00 17 Client sends the length of the second file name as 23 bytes as a 64-bit signed integer in big-endian format. 0000000000000017 in hexadecimal is 23 in decimal.
23 66 6F 6C 64 65 72 31 2F 73 65 63 6F 6E 64 5F 66 69 6C 65 2E 74 78 74 Client sends the name of the second file, which is 23 bytes long when encoded in UTF-8. The file name is "folder1/second_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 26 Client sends the size of the second file as 38 bytes as a 64-bit signed integer in big-endian format. 0000000000000026 in hexadecimal is 38 in decimal.
38 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 73 65 63 6F 6E 64 20 66 69 6C 65 Client sends the content of the second file, which is 38 bytes in size. The file content is "this is the content of the second file" (without quotes).
Third file 8 00 00 00 00 00 00 00 16 Client sends the length of the third file name as 22 bytes as a 64-bit signed integer in big-endian format. 0000000000000016 in hexadecimal is 22 in decimal.
22 66 6F 6C 64 65 72 32 2F 74 68 69 72 64 5F 66 69 6C 65 2E 74 78 74 Client sends the name of the third file, which is 22 bytes long when encoded in UTF-8. The file name is "folder2/third_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 25 Client sends the size of the third file as 37 bytes as a 64-bit signed integer in big-endian format. 0000000000000025 in hexadecimal is 37 in decimal.
37 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 74 68 69 72 64 20 66 69 6C 65 Client sends the content of the third file, which is 37 bytes in size. The file content is "this is the content of the third file" (without quotes).
Fourth file 8 00 00 00 00 00 00 00 21 Client sends the length of the fourth file name as 33 bytes as a 64-bit signed integer in big-endian format. 0000000000000021 in hexadecimal is 33 in decimal.
33 66 6F 6C 64 65 72 32 2F 73 75 62 66 6F 6C 64 65 72 2F 66 6F 75 72 74 68 5F 66 69 6C 65 2E 74 78 74 Client sends the name of the fourth file, which is 33 bytes long when encoded in UTF-8. The file name is "folder2/subfolder/fourth_file.txt" (without quotes) when decoded.
8 00 00 00 00 00 00 00 26 Client sends the size of the fourth file as 38 bytes as a 64-bit signed integer in big-endian format. 0000000000000026 in hexadecimal is 38 in decimal.
38 74 68 69 73 20 69 73 20 74 68 65 20 63 6F 6E 74 65 6E 74 20 6F 66 20 74 68 65 20 66 6F 75 72 74 68 20 66 69 6C 65 Client sends the content of the fourth file, which is 38 bytes in size. The file content is "this is the content of the fourth file" (without quotes).
Fifth file 8 00 00 00 00 00 00 00 0D Client sends the length of the fifth file name (which is an empty directory) as 13 bytes as a 64-bit signed integer in big-endian format. 000000000000000D in hexadecimal is 13 in decimal.
13 66 6F 6C 64 65 72 32 2F 65 6D 70 74 79 Client sends the name of the fifth file, which is 13 bytes long when encoded in UTF-8. The file name is "folder2/empty" (without quotes) when decoded.
8 FF FF FF FF FF FF FF FF Client sends the size of the fifth file (empty directory) as -1 as a 64-bit signed integer in big-endian format. FFFFFFFFFFFFFFFF in hexadecimal is -1 in 64-bit signed decimal.
Sixth file 8 00 00 00 00 00 00 00 07 Client sends the length of the sixth file name (which is an empty directory) as 7 bytes as a 64-bit signed integer in big-endian format. 0000000000000007 in hexadecimal is 7 in decimal.
7 65 6D 70 74 79 32 2F Client sends the name of the sixth file, which is 7 bytes long when encoded in UTF-8. The file name is "empty2/" (without quotes) when decoded. This file name includes the optional trailing '/' for empty directories.
8 FF FF FF FF FF FF FF FF Client sends the size of the sixth file (empty directory) as -1 as a 64-bit signed integer in big-endian format. FFFFFFFFFFFFFFFF in hexadecimal is -1 in 64-bit signed decimal.
Communication ends and connection closes

The files transfered are in the following structure,

.
├── folder1
│   └── second_file.txt
├── folder2
│   ├── subfolder
│   │   └── fourth_file.txt
│   ├── empty/
│   └── third_file.txt
├── empty2/
└── first_file.txt
        

Get Image/Screenshot

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Image/Screenshot method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 05 Client requests the get image method
1 01 Server accepts the request
Get Image 8 00 00 00 00 00 00 00 5F Server sends the length of the image copied to the clipboard (or a screenshot) as 95 bytes as a 64-bit signed integer in big-endian format. 000000000000005F in hexadecimal is 95 in decimal.
95 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 05 00 00 00 05 08 02 00 00 00 02 0D B1 B2 00 00 00 26 49 44 41 54 08 D7 55 CB 21 12 00 20 10 80 40 70 FC FF 97 31 68 F0 68 1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE 42 60 82 Server sends the image copied to the clipboard (or a screenshot), which is 95 bytes long.
The image is: shared image
Communication ends and connection closes

Get Copied Image Only

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Copied Image method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 06 Client requests the get copied image method
1 01 Server accepts the request
Get Copied Image 8 00 00 00 00 00 00 00 5F Server sends the length of the image copied to the clipboard as 95 bytes as a 64-bit signed integer in big-endian format. 000000000000005F in hexadecimal is 95 in decimal.
95 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 00 00 00 05 00 00 00 05 08 02 00 00 00 02 0D B1 B2 00 00 00 26 49 44 41 54 08 D7 55 CB 21 12 00 20 10 80 40 70 FC FF 97 31 68 F0 68 1B B0 42 B9 95 01 F5 AC 8B BF 9A D6 CD FC 0F 82 8C 0E 05 22 B1 80 9C 00 00 00 00 49 45 4E 44 AE 42 60 82 Server sends the image copied to the clipboard, which is 95 bytes long.
The image is: shared image
Communication ends and connection closes

Get Copied Image Only (no data)

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Copied Image method with no data in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 06 Client requests the get copied image method
1 02 Server indicates that there is no image copied to the clipboard (No data)
Communication ends and connection closes

Get Screenshot Only

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Screenshot method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 07 Client requests the get screenshot method
1 01 Server accepts the request
Display selection 8 00 00 00 00 00 00 00 02 Client selects the second screen
1 01 Server accepts the request
Get Screenshot 8 00 00 00 00 00 02 15 7D Server sends the size of the screenshot as 136573 bytes as a 64-bit signed integer in big-endian format. 000000000002157D in hexadecimal is 136573 in decimal.
136573 89 50 4E 47 0D 0A 1A 0A 00 ... (truncated) Server sends the screenshot, which is 136573 bytes long.
Communication ends and connection closes

Get Screenshot Only (no data)

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Get Screenshot method with invalid display in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 07 Client requests the get screenshot method
1 01 Server accepts the request
Display selection 8 00 00 00 00 00 00 00 05 Client selects the fifth screen
1 02 Server indicates that there is no fifth display (NO_DATA) and rejects the request.
Communication ends and connection closes

Info

Note that all the bytes in the "Client sends" and "Server Sends" columns are hex-encoded.

Example of Info method in protocol version 3
Phase Size (bytes) Client sends Server sends Description
Version Negotiation 1 03 Client requests protocol version 3
1 01 Server accepts the request to use protocol version 3
Method selection 1 7D Client requests the info method
1 01 Server accepts the request
Get text 8 00 00 00 00 00 00 00 0A Server sends the length of info as 10 bytes as a 64-bit signed integer in big-endian format. 000000000000001A in hexadecimal is 10 in decimal.
10 63 6C 69 70 5F 73 68 61 72 65 Server sends the info text, which is 10 bytes long when encoded in UTF-8. The info text is "clip_share" (without quotes) when decoded.
Communication ends and connection closes