Network Chat

Approximate Date
Work Context
School Assignment
Contribution Level
Completely Independent
Technologies Used
C#, Windows Forms
Download (19.01 KB)

These simple applications were two separate assignments for the Advanced Object Oriented Programming class. These C# applications use a socket library to facilitate the TCP/IP transmission of text.

The console application can fulfill either the server or client role. It uses a polymorphic routine to establish the connection, producing either a server object or a client object depending on the mode that the program is initiated with. When the program is launched in server mode, it listens for an incoming connection. If the program is launched in client mode, it attempts to connect to the server at the hard coded IP address and port number.

The GUI application can only fulfill the role of client, it uses a slightly modified version of the same chat library the console application uses. The modification is the addition of a logging library that logs the chat session to a plain text file.

As previously mentioned, these applications use hard coded IP addresses and port numbers, specifically the localhost address, so any network communication is simulated with the internal loopback address.