GabrielaSchmitt / ServerClientChat

A project that makes possible a comunnication between many clients in the server.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool


Server and Client Chat

English | Português

Olá, este repositório contém um projeto desenvolvido na com meu colega de faculdade em Junho de 2022. No projeto temos um Servidor e um Cliente, a ideia é conectá-los na mesma rede wifi (desligue o firewall) e fazer uma conexão utilizando o IP do servidor. Uma vez que o cliente esta conectado no servidor ele pode mandar mensagens comunicando-se com os demais clientes conectados. Os clientes são identificados por nome, e cada mensagem enviada contém a data e hora de envio. Em caso de má formatação ou qualquer outro possível erro o cliente é desconectado. O envio das mensagens é feito com no formato de intercâmbio de dados JSON.

Como rodar os códigos

Para rodar os códigos é necessária uma IDE Java como o VSCODE, Eclipse. Você pode testar fazendo 3 máquinas virtuais conectadas por bridge ou com três computadores. Certifique-se de que estão todos na mesma rede wi-fi e altere no arquivo do app o IP e a Porta do Servidor. Em uma das máquinas virtuais rode o Servidor e nas outras duas rode o Cliente, assim poderá ver duas máquinas conectadas trocando mensagens.

✨ Obrigada pela atenção! ✨


English | Português

Hello, this repository contains a project developed with my college friend in June 2022. In the project we have a Server and a Client, the idea is to connect them to the same wifi network (turn off the firewall) and make a connection using the IP of the server. Once the client is connected to the server it can send messages communicating with other connected clients. Customers are identified by name, and each message sent contains the date and time of sending. In case of bad formatting or any other possible error, the client is disconnected. Messages are sent using the JSON data exchange format.

How to run the codes

To run the codes, you need a Java IDE such as VSCODE, Eclipse. You can test by making 3 virtual machines connected by bridge or with three computers. Make sure they are all on the same Wi-Fi network and change the IP and Server Port in the app file. Run the Server on one of the virtual machines and run the Client on the other two, so you can see two connected machines exchanging messages.

✨ Thanks for your attention! ✨

About

A project that makes possible a comunnication between many clients in the server.

License:MIT License


Languages

Language:Java 100.0%