network card game

Started by
2 comments, last by hplus0603 14 years, 10 months ago
im working on network card game and i wonder how to write server program that would be able to send and get info for every play-table at once with minimum delay. using c++ ; SDL,SDL_net ; visual studio 2008
Advertisement
sooo what is your question?
what platform for the server?
tcp or udp?
www.ageofconan.com
server and client are comunicating already
client will chose table and join it. each table must start and run the game seperatly (start/determine cards for each player/check for winner...) becouse games dont start at the same time and arent "timealigned".

so server program should get/give different informations to all tables at once.

Three ways:
1) Fork a new process for each table, and tell the client how to connect to that process using some free port.
2) Fork a new thread for each table, and tell the client how to connect to that thread using some free port.
3) Keep all tables inside the main thread, and update them as a state machine. When a given client sends data, forward that data to the appropriate state machine.
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement