Skip to content

A simple chat to consolidate learning about sockets.

License

Notifications You must be signed in to change notification settings

davidsonbrsilva/gongo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Gongo

License Status

Print screen of Gongo

[Ver em Português]

Gongo is a simple chat built in C# for the purpose of learning about sockets during the Computer Networks course at Federal University of Jequitinhonha and Mucuri Valleys.

It is an app provided with a client-server architecture that allows multiple users to communicate simultaneously through the TCP protocol. So far, the only supported language for Gongo is Portuguese (Brazil).

Requirements

  • .Net Framework 4.8

The software was tested in a Windows environment. If you have problems running in other environments, contact us.

Installation

Clone the repository:

$ git clone https://github.com/davidsonbrsilva/gongo.git

Access the project root folder:

cd gongo

Build the app:

dotnet build

Usage quick guide

There are two executable projects in the same solution, Gongo Server and Gongo Client. Start the GongoServer.exe file to run the application server. Then open the GongoClient.exe file to start a conversation.

Gongo Client will use your local IP as the username by default, but you can change this at any time. Just click (alterar), type the new username you want in the message field and click Confirmar.

Messages sent by you are displayed in purple and messages sent by other users are green.

You can simulate a conversation between multiple users by initiating and sending messages through more than one instance of Gongo Client.

Gongo settings files

Gongo Server and Gongo Client look for their respective configuration files before starting the application.

Gongo Server settings file

By default, Gongo Server will receive connections from any IP address and listen for them on port 22777. However, you can override these settings.

To do so, create a file called ServerSettings.json in the same directory where the Gongo Server executable file is located, with the following structure:

{
    "host":"any",
    "port":"<your_custom_port>"
}

By specifying any in the host property, you tell Gongo Server that you want to receive connections from any IP address. You can also inform an IP address so that Gongo Server only receives connections from this specific one.

Remember that if you use a different port for the Gongo Server, the Gongo Client instances must also connect to the same port released by the server.

Gongo Client settings file

By default, Gongo Client will assume that Gongo Server is running on your local machine and will try to connect to your IP on the server's default port (22777).

To change this, create a settings file in the same directory as the Gongo Client executable called ClientSettings.json with the following structure:

{
    "host":"<gongo_server_ip>",
    "port":"<gongo_server_port>"
}

Contact

If you need, send an e-mail to davidsonbruno@outlook.com.

License

MIT Copyright (c) 2019, Davidson Bruno.