/Code-n-Chat

A demonstration of TCP and UDP sockets. A multi-threaded chat server is made using TCP sockets in java and Simple Data Transfer is shown by UDP sockets.

Primary LanguageJava

Code-n-Chat

This repository contains the demonstration of TCP and UDP sockets.

TCP Sockets

A multi-threaded chat application was made using TCP sockets using the ServerSocketChannel class in java.nio.

  • It supports group texts
  • Personal chats can also be configured by adding a predicate in the brodcast method in Server.
  • Highly scalable due to non-blocking IO of java nio. ( Note serverSocket.setBlocking(false) )

UDP Sockets

Just a demonstration of UDP sockets, showing client server connection. The client sends some messages which the server receives and are shown in the console.