Running a Poker Game Using IPP Tools

This document describes how to use the Internet Poker Protocol (IPP) tools to run a game.

Start the server

IPP services are provided by the IPP server, ippd. During a tournament, we will look after starting a server for the tournament. However, during testing you need to start your own server every time you want to play a game. The server only manages one game at a time, and only plays one game per game.

To start the server, you run the program:

          /u/cs400/poker/bin/ippd
    
By default, the server will listen for new connections on port 9898. Since only one program can listen on a TCP port at one time, you will probably need to use a different port number for your testing. I suggest that if you are in group N for (N from 1 to 4), you use port 9898+N. You pass this port number to ippd using the -port option, as in:
          /u/cs400/poker/bin/ippd -port 9899
    

If you are running several programs with windows, you might find the ``-size small'' option useful to fit them all on your screen. For more information and options, see the ippd manpage.

Start some clients

With the server running, it is now waiting for clients to connect. These clients can include any combination of the following:

During a tournament, you will start your client and connect to the main server. During testing, you will need to start several different clients (including your own) and connect them to the server you started above.

In what follows, we will assume you are running several copies of ippplayer. Typically you would fire up a few xterm's and start a client in each window. The procedure for running the clients differs slightly depending on whether the clients are on the same machine as the server or not (and you should support similar flexibility in your client).

To start the automatic player (the human player interface is similar), you need to specify the player's name and their buyin amount on the command-line, as in:

          /u/cs400/poker/bin/ippplayer George 1000
    
If your server is not running on the default port (as described above), you need to tell the client at which TCP port to contact the server using the -server option, as in:
          /u/cs400/poker/bin/ippplayer -server localhost:9899 George 1000
    
If furthermore your server is running on a different machine that the client, you need to specify the hostname in the -server option, as in:
          /u/cs400/poker/bin/ippplayer -server micro:9899 George 1000
    

As with ippd, the clients support the ``-size small'' option if you want to try to fit more of them on the screen. See the manpages for ippplayer and ipphuman for more options.

Note: The IPP server prints all message traffic to standard output. If you want to save this for future debugging, do something like

          /u/cs400/poker/bin/ippplayer ...args... | tee ippd.log
    
The tee program copies its standard input to both standard output and to the given file. Very handy. Leave standard error unpiped to make sure you see error messages from the server.

Start the game

Once your clients have connected (you can see them on the server's display and in the messages printed by the server to standard output), start the game by pressing the ``Start'' button. This will announce the set of players to all the clients and start the first hand (with the BUTTON message, then the ANTE, and so on).

Ending the game

There is no elegant way to terminate the server. Just kill it by typing Control-C in its window. All clients should also terminate, except for clients that are blocked waiting for input. These will have to be killed by hand.

Be sure to not leave the server running or you will be unable to reallocate the port the next time you try to start the server.


George Ferguson