Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

README

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:

  • -c or --compile: Compile the source code. The output goes into Client/out/classes/ and Server/out/classes/
  • -d pr --delete: Clean the project by deleting all the *.class files
  • -r or --run: Compile and run the *.class files inClient/out/classes/ and Server/out/classes/

Setting up the IRC Server and Client

To bring the Server up, all you need to do is run the server application:

scripts/server -r

Once 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.properties

Then, 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-HERE

You 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.

ToDO

  • Add multithreading for multiple clients
  • Multiple clients talk together
  • Add User Interface

About

A simple IRC built in Java in the 6th week of my challenge

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages