Skip to content

Redfire22/Basic-Java-Server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Basic-Java-Server

Introduction

This Java project is a basic server in Java.

The server handle request from client, each client is handled in a different thread.

There is 2 main function, one that start the server, and one that start the client. The client will connect to the server.

The client can be started before the server, but if it try to connect while the server is offline, there will be an error.

When starting the server :

image

When starting the client :

image

So, you can see the server inform you when it is running.

The Client use a console interface to access function.

Exemple of the client action

If the client want to see all the car with the make : "Ferrari" :

image

The car with the Ferrari make will be displayed to the client.

The server keep track of performed action by client, identifying the client using it's ID.

image

Let's say the client want to buy this Ferrari :

image

The server keep track of this action.

image

And if we try to display that Ferrari again, we can see that the value of ForSales changed :

image

The car is no longer for sale.

Other function are available to the client, but it work in the same way as the one described earlier.

Possible evolution

The first evolution for this program would be to save the logs of the server on a txt file or a .dat file.

Another evolution possible is to add a semaphore to control the max number of connection to the server to avoid DDOS attack.

About

A basic Java server, receive request from a client

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages