/nus-cs2105-socket-programming

Example code from CS2105, illustrating socket programming in Java.

Primary LanguageJava

This repository contains the code I developed in class (with substantial cleaning afterwards) for CS2105, Lecture 3 (Jan 27, 2014).

  • TCPServer: a simple server that echoes what it received back to client.
  • TCPClient: a simple client that reads from keyboard and pass what it reads to server. It then reads the replies from the server and prints what it reads to screen.
  • WebServer: a minimal Web server to illustrate socket programming and selected features of HTTP.