CS2335 - Spring 2004 Lab 4 - NetPaint ============================================================================= PART 1 -- README ============================================================================= DIRECTIONS: This form must be filled out and submitted with the rest of your files for Part 1. For each item replace the underscore characters ('_') with the proper information. If you need more lines than those shown, feel free to add them. ============================================================================= 1. Team Members: Name: Vladimir Urazov GTNum: gtg308i Name: Daniyar Zhanbekov GTNum: gtg563g 2. Compilation Instructions: The program can be easily compiled using the included ANT build file build.xml. The default target there is run, which performs all of the necessary compilation. But if one wanted to compile the program without running, they could just use the "build" target. That will simply build the code. 3. Instructions for Running the Program: Once again, one could use the included ant build file. The "run" target allows you to run the server. It also performs all of the other necessary tasks for running the server, like compiling the sources. The server listens to connections from the clients and broadcasts all the messages received to all the connected clients. It also allows one to validate messages and if a badly formatted message is received from the client, a bad format message is sent to the sender. The server understands three commands from command line. Type in "messages" (without quotes) to see the messages that were transmitted and saved (only chat messages and those related to drawing are saved; maintenance messages, like join and quit messages are not saved). Type in "clients" to see the list of clients currently connected to the server. Type in "quit" to shut down the server. When the server shuts down, it will wait for 60 seconds for the clients to send in a Quit message and then will forcefully close the connections to those clients that did not drop cleanly. To test out the server, one could simply telnet into the host on which it is running using the correct port. (The server prints out the port being used on startup.) Once a client is connected, the server expects a join message (in the format: "HELO:username"). If any other message is received, the connection is dropped. When the user wants to quit, they need to send in a Quit message (in the format: "QUIT:username"). The server will then close the connection cleanly. 4. Known Bugs: ___None_____________________________________________________ ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ 5. Detailed Description of Network Protocol: SRVE - Server error. Rejection, drop, server quitting, etc. Format: SRVE: Message string SRVM - Server message. New user, lost user, etc. Format: SRVM: Message string HELO - User is joining the server. Format: HELO: username QUIT - User is quitting the server gracefully. Format: QUIT: username RECT - user is drawing a rectangle. Format: RECT:msgid:username:startX:startY:height:width:color:fill(y|n) TRIA - user is drawing a triangle. Format: TRIA:msgid:username:x1:y1:x2:y2:x3:y3:color:fill(y|n) LINE - user is drawing a line. Format: LINE:msgid:username:startX:startY:rise:run:color QUAD - User is drawing a quadratic curve. Format: QUAD:msgid:username:x1:y1:x2:y2:ctrlx:ctrly:color IMAG - User is inserting an image. Format: IMAG:msgid:username:startX:startY:height:width:URL Note here that URL can be either a global URL, in which case we would download the image off the Internet, or just a filename, in which case the users would connect to the client that chose the image p2p and request a download. UNDO - User is undoing an action. Format: UNDO:msgid:username:undoid undoid corresponds to the id of the message we want to undo. CHAT - User is sending a chat message. Format: CHAT:username:text 6. Testing/Development Environments (Include OS): [REMINDER: This lab will be graded on the RedHat systems in the States Lab.] __Developed on Windows XP with Emacs. Tested also on RedHat_ machines in the state cluster as well as on helsinki._______ ____________________________________________________________ ____________________________________________________________ 7. Comments: ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ ____________________________________________________________ ____________________________________________________________