/Java_Socket_programming

This repo contains the Socket programming in JAVA.

Primary LanguageJava

Java_Socket_programming

This repo contains the codes for Socket programming in JAVA. Sockets allow communication between two different processes on the same or different machines and Socket programming is a way of connecting two nodes on a network to communicate with each other.

There are 4 sections in this repo.

  • TCP Protocol implementation
  • UDP Protocol implementation
  • File Transfer Protocol imple.
  • A client and server ChatApplication

1) TCP Protocol implementation

TCP provides a connection oriented service, since it is based on connections between clients and servers. TCP provides reliability. When a TCP client send data to the server, it requires an acknowledgement in return.

2) UDP Protocol implementation

UDP is a simple transport-layer protocol. The application writes a message to a UDP socket, which is then encapsulated in a UDP datagram, which is further encapsulated in an IP datagram, which is sent to the destination.

3) File Transfer Protocol imple.

FTP is a standard internet protocol provided by TCP/IP used for transmitting the files from one host to another. It is mainly used for transferring the web page files from their creator to the computer that acts as a server for other computers on the internet.

4) A client and server ChatApplication

In this application client and server sends, reads and replies the messages to each other. It is a cmd based chat application. Below is the image of the chat application view.