Start Server
Process: The system administrator starts a chat room server.[Referring to requirement document Page 1, Server session.]
Pre-conditions:
The host of the chat room server should have at least one IP address other than loop address (127.0.0.1). If there are more than one IP address, the first one will be chosen for simplicity reason.
No other server listening on the same server port.
Post-conditions:
A window of a chat room server is shown on the screen.
The title of the server window will be: Server address: <hostname>/<ip address>
A network server is listening on a CHAT PORT for the clients.
Alternatives:
If there is no IP address other than the loop address(127.0.0.1), the server will still start with a warning message on the title bar. (For test)
If there is another server listening on the same port and cause a server binding error, the NEW chat room server will refuse to start and give an error message.
Close Server
Process: the System Administrator closes the chat room server, and the corresponding client will receive a message and close their window accordingly. [Referring to requirement document P3, Dialog boxes]
Pre-conditions:
The server window exists.
Post-conditions:
The server window closes.
All chat clients get a server closing message.
Alternatives:
None
User Login
Process: A chat room user login the chat room. The chat room user gives the server’s hostname or IP address, as well as his/her chat name, then logs into the chat room. When the chat user logs in, the server will greed with him/her. [Referring to requirement document Page 1, 2 and 3]
Pre-conditions:
The chat user gives the server address and user name properly
There is a chat room server in the Internet, which the client can access.
The server’s hostname or IP address refers correctly to the target chat room server.
There is not another user using the same name at the same chat room.
Post-conditions:
The chat room user enters the chat room.
The chat room user can chat in the room and receive messages from other users in the same room.
The new chat user’s name appends to the chat room server’s People list, and so forth to the People list of the same chat room users.
All users in the same chat room appear on the People list of
Alternatives:
If the user doesn’t give a proper user name, he/her will be refused to login with an error message: “Invalid login attempt: you need to give a valid chat name”.
If the user doesn’t give a proper address of the server, he/her will be refused to login with an error message: “Invalid login attempt: you need to give a valid host name or IP address of the chat room server”.
If the connection to the chat room server fails, the user will get an error message: “Invalid login attempt: connection failed to the server”
If there is another user using the same chat name in the same chat room, the user will be refused to login with an error message: “Invalid login attempt: chat name exists in the same chat room, please change your chat name before you login.”
Send message
Process: A chat room user send a message within a chatroom. This message displays on this user’s chat screen. The server gets the message and display on the server’s message screen. All the other clients get this message and display on their own screen.
Pre-conditions:
The chat room server is alive and reachable.
Post-conditions:
A message displays on all these windows, including the current user’s window, the server’s window and all the other clients’ windows.
Alternatives:
If the message could not send correctly, a message will display on the client’s screen and force the client to exit.
If a message could not reach one of the clients, this particular client will be deleted from the server’s People list and so forth other users’ People lists. When that client try to send a message, the server won’t accept it and then the client will close.
Exit Chat Room
Process: A chatroom user exists the chatroom. The user name will remove from the server’s People list and so forth the other clients’ People lists.
Pre-conditions:
The server exists and is reachable.
Post-conditions:
The client’s name will be deleted from the server’s People lists and so forth the other clients People lists.
The chat client window of that user will be closed and the user can not chat in the chat room anymore.
Alternatives:
If the server is not reachable, the chat window will close anyway and leave the user name on the server’s People screen. The user’s chat name would be deleted from the server’s People list when a new message from one of the other client and the server just find out the chat user has gone. |