Solved:
I'm using WCF to transfer files by streaming. The client calls a method in the service, then the service take the file from the client. On the way, I'm sending back by CallBack the speed.
My problem is that I can't determine which speed am I calculating. When the service takes the file from the client, it uses download speed. However, when the client sends the file it is the upload speed. Which one do I need to calculate, and how?
Not solved yet:
When the client calls the service's method (and gives it the stream with a reference to the file),it takes TOO long (depends on the size of the file) from the time the client calls the method until the service's method starts to activate. Why does this happen? A one Gigabyte file will take forever.
*From the time the service's method starts, the all thing works fine with no problems. So showing the service is a waste of time.
(client)
Stream TheStream = File.OpenRead(@"C:\BigFile.rar");
Service1.GiveAFile(TheStream);
Thanks.