PMFunctReq

advertisement
A. Problem. Sometimes one user will want to communicate directly with
another user. SimpleChat currently has no facility to handle private messages
between individual users.
B. Background Information. This requirement will be based on top of the
requirements for SimpleChat Phase2. In Phase2, any user with the client
program could send a message to the server and the server then echoed that
message to all of the connected clients. The feature of this requirement will
be for a user on a client program to send a message to the server; inside this
message will be the contents of the message along with a specified user to
send it to.
Some issues:
Issue 1:
How will the server know that it is receiving a private
message?
Decision:
Add a command, #private that the server will recognize as not
being a message to send to all clients.
Issue2:
How will the server know where to send the message?
Decision:
The first token after the “#private” command sent by the client
will contain the desired recipient’s loginID. The rest of the
message after the loginID specification will be sent to that user.
Issue3:
What if the specified user does not exist or is not connected.
Decision:
Server sends a message back to the sender indicating that the
message was not sent and that the recipient is either
unavailable or does not exist.
Issue4:
How does the receiving user know they are receiving a private
message?
Decision:
When the server sends a private message to the recipient , the
message is prefixed with the sender’s loginid followed by a
colon. Now the user will know that they are receiving a private
message and what loginid to specify if they should decide to
respond.
Issue5:
Can a user send private messages to themselves?
Decision:
Yes, if they’re bored.
Issue6:
Can a user of the server program send private messages?
Decision:
Yes, This will be useful for chat room moderation.
Issue7:
Can a user send private messages to the server?
Decision:
???
C. Environment and system models. This feature is in addition to Phase2 and
will be added at in conjunction with blocking, forwarding and channels. No
additional environment considerations for this requirement.
D. Functional Requirements.
-This command can be entered into the user interface of either the client
or the server program. The message in this format will be sent to the
server program as it is.
#private <user loginid> <message>
-send <message> to <user loginid>
-does not send if <user loginid> does not exist
-does not send if <user loginid> is not connected
-if not sent, a message is sent to the user who entered the command
that indicates why the message was not sent.
-if message sent, <user loginid> receives a message prefixed by
senders login id , <sender>.
<sender>: <message>
-if the message is from the server, the message will be prefixed by
“Server:”
-if sender sends <message> to <sender>, the message will be prefixed
by “Me: “
E. Other Requirements. There are no additional process, quality, or platform
requirements specific to this feature.
Download