Multiple Clients.... One Server.... Please Help!!!
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?
I''m not a Linux guy but I''d look up select(), non-blocking sockets, and pthreads - in that order.
Dire Wolf
www.digitalfiends.com
Dire Wolf
www.digitalfiends.com
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.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement