Skip to content

darrayes/training-material

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 

Repository files navigation

Intern Material Repository

Welcome to the Intern Material repository!
This repository contains resources, code samples, and exercises used in the training program for interns. It is organized by topics and lectures to help you learn fundamental concepts in computer science and software engineering.


Contents


Introduction to Servers

Folder: servers/
Lecture: Threaded Python Socket HTTP Server

This lecture introduces the concept of servers using a simple threaded HTTP server implemented in Python. The server demonstrates how to:

  • Listen for incoming TCP connections.
  • Handle each client in a separate thread for concurrency.
  • Respond with a valid HTTP/1.1 response.
  • Gracefully shut down on CTRL+C.

How to Run

  1. Navigate to the servers directory:

    cd servers
  2. Run the server:

    python server_threaded.py
  3. Send a request (from another terminal):

    curl http://localhost:9999/

    Or use a browser/Postman.

  4. Expected Output:

    Hello, World!
    

Key Concepts Covered

  • Sockets and networking basics
  • Multithreading for concurrent client handling
  • HTTP protocol basics
  • Graceful shutdown of network servers

Contributing

Feel free to add your own notes, code, or improvements as you progress through the training!


License

This project is licensed under the MIT License.

About

Training material for interns

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages