B
Bern
This is the first time I'm writing a network multiplayer card game.
And the model I have thought of :
The host creates a new thread and this thread listens for clients.
When a client is requesting for connection, the host creates another thread
to communicate with the client throughout the game.
Thus, the whole program has (n + 2) threads, for n clients.
(one for listening, and another one for the GUI)
The client only have to create one thread to communicate with the host.
So is there any built in classes that may be of any help beside the Socket
class.
Is there any other better models?
And the model I have thought of :
The host creates a new thread and this thread listens for clients.
When a client is requesting for connection, the host creates another thread
to communicate with the client throughout the game.
Thus, the whole program has (n + 2) threads, for n clients.
(one for listening, and another one for the GUI)
The client only have to create one thread to communicate with the host.
So is there any built in classes that may be of any help beside the Socket
class.
Is there any other better models?