Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is the Maximum Send Speed of a TCP Client Limited Exactly by the Client Computers' Upload Speed

Background

I am attempting to stream a live feed of a remote computers' desktop to my application. To do this I am using connection-orientated (TCP) sockets, capturing a frame of the client's computer and sending it to the server.

My Research

I am sending a frame (screenshot) every 100 milliseconds (that's 10 FPS). Each frame is around 145kb, that means I need to send 1450kb a second (which equates to 1.4 megabytes, 11 mega bits a second).

My internet has a maximum download speed of 0.32 mega bits per second. Because I need to send 11 mega bits of data a second, this means I my internet is 10.6 megabits slower than what I need. So by my calculations, in order to stream the desktop efficiently I need each frame to be approximately 4.5kb (4608b + 20b TCP header) which is realistically, impossible given the current system, even when sending only updated parts of the desktop and compressing bitmaps.

Question

I am not sure that the system is limited exactly by the upload speed. I think this because 4.5kb is a ridiculously small size. I can stream my desktop perfectly smoothly using similar software (software such as Teamviewer, Join.me and Skype) and even though these software packages use far more intelligent protocols than me (good question here) I highly doubt that they are sending just 4.5kb each frame / desktop update.

So my question is ultimately; are my calculations at all accurate and why? My aim here is to decide what is an appropriate size for each frame so I can then work to reach that size and calculate the quality / interval for different speed connections. I am interested in any comments / answers that are helpful to my situation of course, but the answer I accept will be the one that answers my actual question.

like image 874
Caster Troy Avatar asked Mar 07 '13 14:03

Caster Troy


1 Answers

don't confuse bits and bytes first of all, because your calculations are a bit confusing.

second of all, you are only looking at the size of the object you are sending, you are forgetting the packet itself, it adds a bit to the size and don't forget the TCP delay you will endure. If your network is this sensitive to sending traffic, I would suggest upgrading it, or use better compressions.

To conclude I would always say: the bandwidth supported by the network is equal to the part with the smallest bandwidth along the needed path.

ex: 10M => 100K => 1M ==> 10M (here the max speed is 100K)

like image 191
Bulki Avatar answered Sep 18 '22 14:09

Bulki