Skip to content

Adrien-COSTANDI/ChatTCP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChatVaBien

This project aims to implement a "home-made" chat protocol.
Find the RFC (redacted in French) in PDF format here.
It will be implemented using Java 24 for both the client and the server.

Architecture of the server

The global architecture of the server will have one main blocking thread accepting connections from clients and a pool of non-blocking threads that will handle every client with a Selector each

The main loop of those threads will use the select method to check every client that has been registered into it so that it can process the data.

Architecture of the client

The architecture of the client will have two threads :

  • one for reading user inputs from the console
  • one for managing the network part

The network thread will also be non-blocking with a Selector and the console thread will be blocking, reading from the standard input.
The messages will be processed from the console thread to the network thread using a custom thread-safe class.

Client commands

A user will write messages and press return to send the message.
If a message starts with / (slash), it will be interpreted like a command.

Here is the list of commands a user can use :

  • /connect user (alias /c user) send a request to user to start a private conversation
  • /accept user (alias /a user)accept the request from user that asked for a private conversation
  • /deny user (alias /d user) denies the request from user that asked for a private conversation
  • /requests (sent/received) shows every pending request for private conversations the user has sent or received
  • /help (alias /h) shows help for every command

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages