• Advertisement

Archived

This topic is now archived and is closed to further replies.

Multiple Clients.... One Server.... Please Help!!!

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

I''ve been working in C++ (in linux) in an attempt to learn sockets and network programming. I have been able to create server that forks every time a new client connects. So each client has it''s own server process. However, this creates a bit of a problem because I would like for multiple clients to connect to the same server and exchange information (in order to create a multiplayer game). Using forking I can''t seem to get this to work (well anyway). I thought about using threads, but I can''t find any decent thread tutorials on the net. Have any of you come across this problem? Anyone have a solution? Anyone know of any good resources that can help me out?

Share this post


Link to post
Share on other sites
Advertisement
Thanks, the select() fuction will help tons! Does anyone have any good resources on pthreads? I''m having a hard time finding anything useful on the net.

Share this post


Link to post
Share on other sites
I would suggest that you get it to work without threads first. If you don''t have a multiprocessor system, you aren''t going to benefit from threading much unless you are using blocking APIs.

Share this post


Link to post
Share on other sites

  • Advertisement