Example of communication

From Catchcopy
Jump to: navigation, search
Connexion of the client (the file explorer of software to do file copy) to the server (the copie software)
Legend:
Size total of the packet, included this 32Bits part
Query id, is auto incremented id
Reply code (1000, 1003, 5000), used by client if wanted
Size of string list
Size in byte of string
Real string content

Registering of the procol (obligation before all)
Client -> Server: query 00000001, array("protocol","0002")
00000001000000020000001000700072006f0074006f0063006f006c000000080030003000300032
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000002c00000001000000020000001000700072006f0074006f0063006f006c000000080030003000300032


Reply of the server to the query 00000001
Server -> Client: reply to the query 00000001,1000, array("protocol supported")
00000001000003E8000000010000002400700072006f0074006f0063006f006c00200073007500700070006f0072007400650064
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000003800000001000003E8000000010000002400700072006f0074006f0063006f006c00200073007500700070006f0072007400650064


Send client name
Client -> Server: query 00000002, array("client","test client")
00000002000000020000000c0063006c00690065006e007400000016007400650073007400200063006c00690065006e0074
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000003600000002000000020000000c0063006c00690065006e007400000016007400650073007400200063006c00690065006e0074


Reply of the server to the query 00000002
Server -> Client: reply to the query 00000002,1003, array("client registered")
00000002000003eb00000001000000220063006c00690065006e007400200072006500670069007300740065007200650064
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000003600000002000003eb00000001000000220063006c00690065006e007400200072006500670069007300740065007200650064


Send copy list A
Client -> Server: query 00000003, array("cp","c:\source-folder\","c:\destination-folder\")
00000003000000030000000400630070000000220063003a005c0073006f0075007200630065002d0066006f006c006400650072005c
0000002c0063003a005c00640065007300740069006e006100740069006f006e002d0066006f006c006400650072005c
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000006a00000003000000030000000400630070000000220063003a005c0073006f0075007200630065002d0066006f006c006400650072005c
0000002c0063003a005c00640065007300740069006e006100740069006f006e002d0066006f006c006400650072005c


Send copy list B
Client -> Server: query 00000004, array("mv","c:\source-file.iso","c:\destination-folder\")
000000040000000300000004006d0076000000240063003a005c0073006f0075007200630065002d00660069006c0065002e00690073006f
0000002c0063003a005c00640065007300740069006e006100740069006f006e002d0066006f006c006400650072005c
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000006c000000040000000300000004006d0076000000240063003a005c0073006f0075007200630065002d00660069006c0065002e00690073006f
0000002c0063003a005c00640065007300740069006e006100740069006f006e002d0066006f006c006400650072005c


Reply of the server to the query 00000004, the copy list B is finished
Server -> Client: reply to the query 00000004,1005, array("finished")
00000004000003ed000000010000001000660069006e00690073006800650064
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000002400000004000003ed000000010000001000660069006e00690073006800650064


Reply of the server to the query 00000003, the copy list A is canceled
Server -> Client: reply to the query 00000003,1007, array("canceled")
00000003000003ef000000010000001000630061006e00630065006c00650064
Packet really send, with header for recomposition and 1 block send (not cuted) because is smaller than 32KB (<a href="http://catchcopy.first-world.info/forum/forum-english-catchcopy/catchcopy-protocol-v0002-t213.html#p474" class="postlink">see recomposition part</a>):
1) 0000002400000003000003ef000000010000001000630061006e00630065006c00650064