Hi,

        Thomas Cort <[EMAIL PROTECTED]> contributed pokerd, a
minimalist poker server written in C
http://cvs.gna.org/cvsweb/pokerd/?cvsroot=pokersource

        It is a competitor of poker-network (written in python).
Hopefully the two will benefit from each other.

        Here is the description from the user guide.

        Enjoy,

----------------------------------------------------------------------
4.0 Program Overview

Configuration

There are a number of ways to configure the server. First, you can change
the system defaults in the conf.c file. Second, you can use command line
switches (see above). Third, you can create a configuration file called
".pokerd". That file contains a set of keys and values. The possible
keys are: dbusername, dbpassword, dbhostname, dbdatabase, 
port, debug, log. An example configuration lines is "port=9999".

How it works

The execution begins in main.c All of the internal structures are
initialized and things get configured. After that control moves to 
pokerserv.c This part of the code handles incoming connections. A
new thread is created that runs the actual games (deals, etc) and the
main thread creates a socket and waits for activity. Once a new player
connects a thread is created to authenticate that player. Once 
the player is authenticated the authentication thread dies at the
end of auth.c. The thread handling the game play will know about
the new player the next time it looks at the 'users' database table.
The users' socket descriptor is stored there. When there are 0 or 1
players the server does a loop in poker.c where it checks the database
for new users and then sleeps. Once there are enough users to play
a game (2) the game begins. If there are >10 players only 10 get dealt
in. The rest of the players just get to view the action. Stats are kept
in the database to ensure that everyone gets a chance to play. When
a signal is recieved a flag is set and the threads exit as soon as
possible. There is a counter in monitor.c that ensures all of the
threads are dead before the server exits.

Using the Program

Using the server is pretty simple. You just type ./pokerd and it goes.
If you want to see what it is doing use the -d switch to stop it
from going into the background. You can also look at the database tables
to see how well or how poorly players are doing.

To stop the program just send it a QUIT signal. kill -3 [pid_of_pokerd]
You can also type ctrl+c if pokerd is in interactive mode (ie pokerd -d)

There isn't much in the way of client software at the moment. You can
download a simple text based client for testing out the
server software at the following URL: http://tomcort.com/poker 
The contribution of a graphical client would be rewarded with beer. 
E-mail [EMAIL PROTECTED] if you've got one.

-- 
+33 1 76 60 72 81  Loic Dachary mailto:[EMAIL PROTECTED]
http://dachary.org/loic/gpg.txt sip:[EMAIL PROTECTED]

_______________________________________________
Pokersource-users mailing list
[email protected]
https://mail.gna.org/listinfo/pokersource-users

Reply via email to