Replies To: how to check the elapsed time with tcp client using serialization inC#

Re: how to check the elapsed time with tcp client using serialization inC#

Posted 13 April 2013 - 01:56 PM

Well, a millisecond is 1/1000th of a second. If you have a local network with 48Mbps (slowest device on my current network) you can transmit 48kbps in 1 millisecond. That's a text string about 4800 characters long (if you include framing bits, etc.) How long is the data you are sending?

So your endTime time could be initialized to DateTime.Now when you get the message, and in your message, you can also set your startTime to DateTime.Now at send time.

Of course you also have to factor in that two different machines may not have their clocks exactly synchronized. So you'll need to do some handshaking between the two to figure out the time delta between the two machines.

Be warned that when sending on your loopback circuit on localhost, it tends to be very very fast. You may need to resort to using the High Performance Counters to get the time delta.

Re: how to check the elapsed time with tcp client using serialization inC#

Posted 13 April 2013 - 02:11 PM

Momerath, on 13 April 2013 - 01:56 PM, said:

Well, a millisecond is 1/1000th of a second. If you have a local network with 48Mbps (slowest device on my current network) you can transmit 48kbps in 1 millisecond. That's a text string about 4800 characters long (if you include framing bits, etc.) How long is the data you are sending?

wow u right! I sent 100BS..
when I tried to send 40000kbs the numbers changed but I get memory exception after few messages.. how can I transfer huge messages between the clients?