20% of project credit. The project is done in two-person teams.
1) The messenger asks the user for a user name. The user name is then used to identify messages that the user typed.
2) The messenger has a preferences file, in which user options are stored. This file is a human-readable text file, where each line has the format "option=value", e.g., "user=john". At least, the file stores the user name and the path of the log file. Whenever the messenger is started, the preferences file is read in.
3) The messenger has two menu items or buttons called "connect" and "wait for connection". "Connect" opens a dialog that asks the user for the IP address (or host name) and port number to connect to, and then tries to establish a TCP/IP connection to that computer. If a messenger is waiting for a connection at the given address, a connection is established, and the two messengers can exchange messages. "Wait for connection" opens a dialog that asks the user for a port number and then displays the message "waiting for a connection..." and blocks until a connection is established.
4) To send a message across a connection, use a simple command called "SEND". The first word after send is always the name of the originating user, and all remaining words up to the line break constitute the message.
Hint: To test your messenger, you do not need an Internet connection. Instead, you can run two instances of the program on one computer, and use the host name "localhost".