Advertisement

What protocol i have to adopt for reliable transmission?

Started by December 19, 2005 02:36 AM
6 comments, last by cartographer 19 years, 2 months ago
Hi all, I have devloped a Remote Managment App. where server captures the updated regions of its screen and sends to client. Problem is that server captures the area which is updated and then sends. Updation is so frequent and so quick if i will try to send all the updates as they occur then i think evrything will stop. So i stores the updates info into a queue and then get them one by one and sends to client. It looks all will be fine but after some data tranfer my client stops receiving data. Why i dont know? What protocol i have to use to make my session a reiable one and to minimize memory usage by removing intermediate queue? Thanx
I suggest you use an existing library that does these things. Windows has a built-in Terminal Server which you can use; there's also freeware solutions.

To build it from scratch, you have to merge pending updates in the queue so you don't re-send already stale data. You also have to compress the data you send at the point where you send it (not sooner, as you need the uncompressed data to merge update areas). Last, you should use TCP for the connection, because it's reliable, and efficient for streaming.
enum Bool { True, False, FileNotFound };
Advertisement
U r quite right but we need our own properietry standard.
Actualluy i m using system wide hooking dll to hook into
the address space of each running process. That dll captures
all the messages sent to these processes by OS and post the
messages related to screen updates to my server application.
Each message contains area of the updated rectangle. My server
application gets the messages posted my dll.

If i dont use queue to store all messages posted to my server
by my dll then i may loss ceratin messages but if i use it then
my memory usage goes higher.

So in that situation what should i do.
Dear taking union of updated regions is efficient if the regions are closer
but if the regions are far off then it i m going to create a region that
maybe my whole desktop.

Problem i m facing after some upadtes are visible on client side then
it stops why i dont know?
You will need, at the worst, a copy of the entire desktop, plus a region that encompasses the entire desktop. The coalesced memory usage will never go bigger than that (times two, because you need to keep a record of new changes once you start sending an old change). Thus, the memory use can be bounded to two times the desktop size, plus some management data.

If your client falls behind your server, then you don't have enough bandwidth to do what you want to do. You have to either find a clever way of compressing the data, or increase the available bandwidth.

If your program doesn't work the way you want it to work, then you should use normal tools (test cases, log files, debugger, etc) to investigate what's actually happening, and compare that to your model of what should be happening, until you know what the bug is.
enum Bool { True, False, FileNotFound };
OK i will try it.
Advertisement
I need help regarding to negotiating protocol.
What messages server/client should send and receive.
When server should send the regions(rectangle) to the
client?

I think its more important and difficult for me then making
a hooking dll and capturing regions bcz i m not so strong
in making a protocol( a reliable).

This topic is closed to new replies.

Advertisement