You are on page 1of 7

NPR Mid-Term Project Report

Multi-client chat application using TCP java socket

Nguyễn Quốc Hiếu 1801040083


Đỗ Minh Hoàng 1801040093

1. Project description:

In this project, we aimed to provide 2 applications which using TCP/IP socket method. The
applications are developed with GUI of both Server Application & Client Application. Those
applications complete following objectives:

Create a server that has port 9090 as default.


Allow users accessing to connect to the server.
Allow multiple clients to communicate to the server.
The flow of the system is represented by the below diagram.

Diagram
PROJECT IMPROVEMENT:
Change Enter button from inserting line break to instantly sending a message, now both
Send Button from the GUI, and Enter short key have event to send a message.
The line break now will be changed to the combination of keys Alt + Enter.
This change was advised by teacher to improve user experience.
2. Results:

Our project has 2 main GUI:

2.1 Server

Server is used to set up server, in this project we used the default port 9090 and IP Address
which is localhost address:

In Server, it has a button which to start server. It is easy to execute since it is one-click away.
Server must be start to let user access to.
In Server, it has a Tabbed Pane which to show the message of client who sent message to server.
When client connect to the server, Server will automatically create a tab which is used show a
chat panel. And that client will enable to communicate with server privately.
Show the tab panel for the server to know who he/she communicate to right that moment
Status display whether server running or stop
Server GUI

Started ServerGUI
Waiting for client

ServerGUI chat panel


2.2 Client

Client Application displays the chat section for the user to communicate with the server app. We
also used the same default port and IP address (which are the same with Server) so when
Connect button is clicked the client application will establish a connection with a server
application.

User can send message to the server in private.


User registers a name which need to display to server know who is it as a credential.
.

Client Interface
Successfully connect to the server

Server Application after a client is connected.


Client chat with server

3. Conclusion

Java sockets are quite useful in a variety of programming domains; this project is only one
example of their use. Despite the fact that it is only a simple chat application, we can show to the
java socket's efficiency in today's programming approaches.

You might also like