Skip to content

Elhazin/HTTP_SERVER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HTTP_SERVER

This project involves the creation of an HTTP server from scratch using C++ and C.

The objective of this project is to gain a deep understanding of how servers work, their functionalities, and features. We implement key HTTP methods: GET, POST, and DELETE.

Some Important Concepts

In this project, you'll delve into various concepts, with one of the most fundamental being sockets.

A socket is a crucial mechanism that enables communication over the internet. It can be likened to file descriptors but serves as a specialized type of file descriptor. For detailed information, refer to the following resources:

How We Build It

To successfully build this project, you'll need to become acquainted with several essential functions.

socket()

The socket() function is one of the cornerstones of server creation. It is used to create a socket, an essential component in server operation. Here's the basic syntax:

int my_socket = socket("Domain", "socket type", "protocol to be used");

In practice, it might look like this

int my_socket = socket(AF_INET, SOCK_STREAM, 0);

Understanding ports, sockets, and addresses can be likened to a physical address system. You, the application, reside in your "apartment." The address represents the location, the mailbox corresponds to the port, the network resembles the post office, and the socket serves as the key granting access to the correct mailbox.

Selecting the port that the socket can connect to is accomplished using the bind function.

About

Webserve is an exciting project that allows us to create an HTTP server entirely from scratch using only the power of C and C++. 🚀

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages