Sign in to follow this  

What protocol i have to adopt for reliable transmission?

This topic is 4377 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by cartographer
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.


The same what windows uses, namely message coalescing. If a mouse position update arrives while there is an unprocessed mouse move in the application's message queue, windows just updates that message. This reduces the number of messages in case of heavy load, but gives more accurate results if the application can process messages fast enough. For update regions, the same rule applies, you can always use the union of two regions for updates, it will only increase the size of the update area slightly but results in far fewer messages to process.

Viktor

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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).

Share this post


Link to post
Share on other sites

This topic is 4377 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this