This is a Client-Server application built in Java using Sockets.
To compile and run the application, use the scripts/client and scripts/server scripts.
These scripts do basically the same thing, one for the client application and the other one for the server application. The scripts can be used to compile each application and then run them. Both scripts allow you to use these flags:
-cor--compile: Compile the source code. The output goes intoClient/out/classes/andServer/out/classes/-dpr--delete: Clean the project by deleting all the*.classfiles-ror--run: Compile and run the*.classfiles inClient/out/classes/andServer/out/classes/
To bring the Server up, all you need to do is run the server application:
scripts/server -rOnce the server is up and running, different clients can connect and start chatting. Each client needs a properties file, located at resources/client.properties.
To set up the client, you need to rename the client.properties.example file to client.properties and set the host and port to the server's hostname and port:
cp resources/client.properties.example resources/client.propertiesThen, open the client.properties file and set the host and port to the server's hostname and port.
# Server-side information
host=SERVER-HOSTNAME
port=SERVER-PORT
# Client properties
username=YOUR-USERNAME-HEREYou need to set the server-side values correctly or you won't connect to the server.
After setting the host (String) and port (Integer), make sure to add a username for yourself.
This will act as an identifier for you when you chat online with other people.
- Add multithreading for multiple clients
- Multiple clients talk together
- Add User Interface