1. Server sending to desktop client
Server Log:
10/09 09:52:01,srv,started
10/09 09:52:09,srv,Client Connected
10/09 09:52:10,srv,File Request received
10/09 09:52:10,srv,Sending... consumer.csv
10/09 09:52:10,xxx,writing 79181
10/09 09:52:10,xxx,writing 46413
10/09 09:52:10,xxx,writing 13645
10/09 09:52:10,xxx,waiting for confirmation data
10/09 09:52:10,srv,OK
Desktop Client Log:
10/09 09:51,2,started
10/09 09:51,2,Connected to server
10/09 09:51,2,Requesting...
10/09 09:51,2,Receiving... consumer.csv (79181)
10/09 09:51,2,Deleting existing file consumer.csv
10/09 09:51,xxx,reading 79181
10/09 09:51,xxx,reading 46413
10/09 09:51,xxx,reading 13645
10/09 09:51,xxx,writing confirmation
10/09 09:51,2,OK
2. Server sending to PPC Client
Server Log:
10/09 10:04:23,srv,Client Connected
10/09 10:04:23,srv,File Request received
10/09 10:04:23,srv,Sending... consumer.csv
10/09 10:04:23,xxx,writing 79181
10/09 10:04:24,xxx,writing 46413
10/09 10:04:25,xxx,writing 13645
10/09 10:04:25,xxx,waiting for confirmation data
10/09 10:04:26,xxx,waiting for confirmation data
10/09 10:04:27,xxx,waiting for confirmation data
10/09 10:04:28,xxx,waiting for confirmation data
10/09 10:04:29,xxx,waiting for confirmation data
10/09 10:04:30,xxx,waiting for confirmation data
10/09 10:04:31,xxx,waiting for confirmation data
10/09 10:04:32,xxx,waiting for confirmation data
10/09 10:04:33,xxx,waiting for confirmation data
10/09 10:04:34,xxx,waiting for confirmation data
10/09 10:04:35,xxx,waiting for confirmation data
10/09 10:04:36,xxx,waiting for confirmation data
10/09 10:04:37,xxx,waiting for confirmation data
10/09 10:04:38,xxx,waiting for confirmation data
10/09 10:04:39,xxx,waiting for confirmation data
10/09 10:04:40,xxx,waiting for confirmation data
10/09 10:04:41,xxx,waiting for confirmation data
10/09 10:04:41,xxx,waiting for confirmation data
10/09 10:04:43,xxx,waiting for confirmation data
10/09 10:04:44,xxx,waiting for confirmation data
10/09 10:04:45,xxx,waiting for confirmation data
10/09 10:04:45,srv,Error (confirm timeout)
10/09 10:04:45,srv,Error-Exit sending loop
10/09 10:04:46,srv,Connection ended
PPC Client Log:
10/09 10:03,2,started
10/09 10:03,2,Connected to server
10/09 10:03,2,Requesting...
10/09 10:03,2,Receiving... consumer.csv (79181)
10/09 10:03,2,Deleting existing file consumer.csv
10/09 10:03,xxx,reading 79181
10/09 10:03,xxx,reading 77842
10/09 10:03,xxx,reading 76482
10/09 10:03,xxx,reading 75122
10/09 10:03,xxx,reading 73762
10/09 10:04,xxx,reading 72402
10/09 10:04,xxx,reading 71042
10/09 10:04,xxx,reading 69682
10/09 10:04,xxx,reading 68322
10/09 10:04,xxx,reading 66962
10/09 10:04,xxx,reading 65602
10/09 10:04,xxx,reading 64242
10/09 10:04,xxx,reading 41122
10/09 10:04,xxx,reading 39762
10/09 10:04,xxx,reading 38402
10/09 10:04,xxx,reading 37042
10/09 10:04,xxx,reading 35682
10/09 10:04,xxx,reading 34322
10/09 10:04,xxx,reading 31602
10/09 10:04,xxx,reading 30242
10/09 10:04,xxx,reading 28882
10/09 10:04,xxx,reading 27522
10/09 10:04,xxx,reading 26162
10/09 10:04,xxx,reading 24802
10/09 10:04,xxx,reading 23442
10/09 10:04,xxx,reading 22082
10/09 10:04,xxx,reading 20722
10/09 10:04,xxx,reading 19362
10/09 10:04,xxx,reading 18002
10/09 10:04,xxx,reading 16642
10/09 10:04,xxx,reading 15282
10/09 10:04,xxx,reading 13922
10/09 10:04,xxx,reading 12562
10/09 10:04,xxx,reading 9842
10/09 10:04,xxx,reading 8482
10/09 10:04,xxx,reading 7122
10/09 10:04,xxx,reading 5762
10/09 10:04,xxx,reading 4402
10/09 10:04,xxx,reading 3042
10/09 10:04,xxx,reading 1682
10/09 10:04,xxx,reading 322
10/09 10:04,xxx,writing confirmation
10/09 10:04,2,OK
I've used a code similar to the FileTransfer code to transfer a 150mb file to the device and it worked fine.
One thing that you can do is to let the client send a message (can be one byte) to the server when the file transfer was finished. On the server side read this message after sending the file. The server will be blocked on this reading until the message arrive.
because it is TCP/IP if the server doesn't get an error then you can assume that the client got the data OK. That is the reason for using TCP/IP for transfers, it has timeouts and retries built in to it.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?