Need help about multiple socket connections?

Started by
2 comments, last by Frequency 18 years, 4 months ago
Hi all, I m developing an applicatopm like Remote Desktoping. I have made a server that starts capturing and sending of desktop image in segments(grid) upon client request and client receives the segments and shows segments properly on its window. Problem is that server captures the updated regions of the desktop and sends only updated segemnts to client.If the whole desktop is updated simultaneously then server will send all the segments and client will show all the segments but on client side since i m using same socket connection to receive all the segments so on client side these segments appear sequentially bcz they are comming sequentially. I require that when server captures all the segments they are updated in a parallel way. I was thinking to use multiple socket connections with multiple therads to acheive this parallel effect. But i know that it will be an overload to use multiple threads and multiple sockets. Plz give me some ideas so that i can use robustly my network resources. Thanx
Advertisement
The problem is the networking -- the network is serial, and it has a limited bandwidth.

If you want to present all chunks at once, then you should have a flag in your packet that means "delay presentation", and then another packet that means "present everything now". When a big update happens, set the "delay" flag, and when you sent all the packets, send the "present" packet.
enum Bool { True, False, FileNotFound };
Thanx for ur reply but dear here is the problem that
i have to provide the fast access of my server desktop
to client. U r quite right that i can use double buffering on client side
to provide a touch of at once updation but again the data transfer
is serial. Is there any other way to gain that effect?

I was using TCP/IP for communication but now i m going to use
UDP. I think it will give me certain speed enhancements.
Whats ur opinion?
The data is moving on a single wire to the client computer. Multiple sockets and threads will not improve the speed of a connection - if you want it all to update at once, I would recommend the course of action the previous poster suggested.
It only takes one mistake to wake up dead the next morning.

This topic is closed to new replies.

Advertisement