BILLTP Protocol Definition

The Better Internet Lists of Lists Transfer Protocol (BILLTP) provides an Internet interface to my favorite lists... things like movies and quotes and students, you know. BILLTP was created for CSC 469 Program #1.

Protocol Specification

BILLTP is simple. Here a table of the client requests (commands) and their respective server replies:

Client Request Server Action/Reply/Example
LISTS Action: Server lists the names of the lists that it currently knows about

Reply: a comma-separated string list names. If no lists are available, then an empty string "" is returned.

Example: movies,quotes,1969 Chicago Cubs baseball players

LIST <num> Action: Server sets the "current list" to the number specified. If <num> is not specified or out of range, then a list is chosen randomly.

Reply: the number of objects in the current list. If no lists are available to the server, then 0 is returned.

Example: 17

ITEM <num> Action: Retrieve the <num> element in the list. If <num> is not specified or out of bounds, then an item is chosen randomly and returned.

Reply: the value of the item at that position in the list

Example: It's a Wonderful Life

HELP Action: Server returns a help string of the available commands.

Reply: a list of the commands that the server knows

Example: erful Life

EXIT Action: Closes the server's socket connection to the client.

Reply: always "OK"

Example: OK

Running the Server

The BILLTP server is written in Java; it's Java class BilltpServer. so it can be run using the following DOS command:

java BilltpServer

By default the BILLTP uses port number 7870. You can override this by passing in an alternative port number to the server. In the next example, the BILLTP server is set to port 5555:

java BilltpServer 5555

That's it. Error-check (and the protocol itself) are minimal, but email me ( wtkrieger@noctrl.edu ) with any problems.

thanks... yow, bill