Jump to content
  • Advertisement
Sign in to follow this  
cartographer

Need help about multiple socket connections?

This topic is 4869 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 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

Share this post


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

Share this post


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

Share this post


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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!