Hack Forums
[C#] rdp . sending frames on a loop vs sending a frame by a frame ??? - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [C#] rdp . sending frames on a loop vs sending a frame by a frame ??? (/showthread.php?tid=5312951)



rdp . sending frames on a loop vs sending a frame by a frame ??? - kanare007 - Jun 21, 2016

Hello everyone ,
so , i'm trying to build a remote desktop app , and i was wondering .
which one is the right approach to do it in order to keep things smooth when it comes to cpu and net traffic memory usage .
should send a client a signal to send me a continues chain of frames (on a separate thread) , then send him a signal to stop
or should i send a signal to send me the first frame only and wait till i ask him for the second one .
i took a look at the source code of Quasar Rat , and I've noticed that he is using the second method (by the way , that thing is looks like it was nested by a spider :D , i love it )

so if anyone has a peace of knowledge , please share
examples of other rats are welcomed .


* - Kylos - Jun 21, 2016

If you are using TCP send frame by frame(per image), compressing the package perhaps with fractals

If you are using UDP you can split and send the frame as you wish as you will not require data integrity, this approach is good if you want something fast like direct streaming but don't go over 65k+ bytes


* - 6e756c6c - Jun 21, 2016

If you send a frame then wait for a 'continue' command you're going to basically double the latency between frames; degrading your frame rate significantly.


* - The-One - Jun 22, 2016

You should only send changes prior to the last screen capture. This is called delta encoding. This will greatly decrease the amount of memory/bandwidth usage. This article will be a good read on how it works and how one can implement it.

https://en.wikipedia.org/wiki/Delta_encoding


* - ytlayol - Jun 22, 2016

DragonHunter aka AnguisCaptor has a library for this with different methods of encoding images. Take a look Here


* - kanare007 - Jun 22, 2016

(Jun 22, 2016 07:46 AM)The-One Wrote:  You should only send changes prior to the last screen capture. This is called delta encoding. This will greatly decrease the amount of memory/bandwidth usage. .....

i'm actually working on it , but afraid that it would take a long time to compare two bitmaps

(Jun 22, 2016 08:59 AM)loyalty Wrote:  DragonHunter aka AnguisCaptor has a library for this with different methods of encoding images. Take a look
i will definitely see how to implement it


* - SL x TnT - Jun 22, 2016

(Jun 22, 2016 12:48 PM)kanare007 Wrote:  i'm actually working on it , but afraid that it would take a long time to compare two bitmaps

I messed around with that for fun months ago. Managed to get it down to ~3ms to compare the bitmaps. Took longer to use LockBits. The biggest issue is bandwidth concerns.

It's a good learning experience, if you enjoy challenges.


* - kanare007 - Jun 23, 2016

(Jun 22, 2016 02:51 PM)SL x TnT Wrote:  I messed around with that for fun months ago. Managed to get it down to ~3ms to compare the bitmaps. Took longer to use LockBits. The biggest issue is bandwidth concerns.

It's a good learning experience, if you enjoy challenges.
i'm all about challenges