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

Started by
3 comments, last by cerlendson 21 years, 8 months ago
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?
Why can''t I write everything in PERL?
Advertisement
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
[email=direwolf@digitalfiends.com]Dire Wolf[/email]
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.
Why can''t I write everything in PERL?
sdl has some thread functions. i dont know if that is what you are looking for.
Rodger
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