Skip to content

sappoPrivy/Socket_layer_Implementations

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

19 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Socket layer implementations

IK1203 Networks and Communication, 7.5 credits at KTH Royal Institute of Technology
Code developed by Tenzin Sangpo Choedon, Spring 2025 (Republished)
Skeleton declaration provided by KTH

πŸ“„ Overview

This project implements networking applications through the socket API. This entails designing the client and server side of the client-server communication architercture. The client side is a general-purpose TCP client that can communicate with servers through different application protocols. The web server in this project processes the http requests through calling TCPClient.askServer(). This HTTPAsk server is also concurrent which implies it can process the request of multiple clients in parallel. The HTTP request can be made in the web broswer and the resulting HTTP response is displayed in the web browser.

πŸ—‚οΈ Table of Contents

πŸ—οΈ Project Structure

root/
β”œβ”€β”€ tcpclient/
β”‚ └── TCPClient.java
β”œβ”€β”€ ConcHTTPAsk.java
β”œβ”€β”€ MyRunnable.java
β”œβ”€β”€ README.md
└── .gitignore

βœ… Prerequisites

Java 18

  • Required Java version:

    sudo apt install openjdk-18-jdk

    curl

  • Install curl using:

    sudo apt install curl

πŸš€ Usage

Run the scripts in this order:

  1. Client connects with a TCP server through terminal
    java TCPAsk time.nist.gov 13
  2. Run the HTTPAsk server
    java ConcHTTPAsk 8888
  3. Open TCP connection through web-based approach and send GET request
    curl http://hostname.domain/ask?hostname=time.nist.gov&limit=1200&port=13

About

Networking programming in Java

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages