This document describes how to use the Internet Poker Protocol (IPP) tools to run a game.
To start the server, you run the program:
/u/cs400/poker/bin/ippdBy 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.
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 1000If 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 1000If 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.logThe 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.
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.