Creating a Web Server from Scratch in C

preview_player
Показать описание
A practical example of creating a web server in C. Unlike most tutorials, this is a web server I intend to put into production and host my own website. Additionally, I want this server implementation to be useful for any kind of server, so I will be adding it as a component in my open source C library, hdelibc, which is available on GitHub:

0:00 - 0:56 Node Update
0:57 - 2:49 Bad Techniques
2:50 - 7:52 Server Struct
7:53 - 14:07 Server Constructor
14:08 - 21:25 Sockets
21:26 - 31:32 Testing
31:33 - 45:59 Debugging
46:00 - 47:43 Demo
Рекомендации по теме
Комментарии
Автор

I'm very poor and I have an old PC but I love programming . I thought maybe if I use c I can become a really good developer ^_^ thank you 😊 this is life changing for me

atefehz
Автор

This showed up on my feed and it was great watching this over dinner. I haven't touched C since undergrad (been with Haskell for I don't know how long now) and it's refreshing to watch some good, honest C code. I hope you continue making videos this coming year, you're great at presenting and it's clear you're experienced. Will share your channel for a boost.

nsrc
Автор

Wow, in first 3 minutes you already grabbed my attention by explaining overuse of OOP like no one else

koool
Автор

This is absolute gold! I'm going to go over this super thoroughly after I'm done with data structures

whatever
Автор

God bless, I'm a beginner but the sequential teaching makes everything looks as though I was a pro.😂😂🎉❤❤

qedgwzh
Автор

How do you not have a million subscribers is beyond me! This is really great subject. Practical C tutorials are like diamonds. Super valuable and in short supply. Keep going. You're awesome

rauldeandrade
Автор

Bro, C code is so clean!!!! I love it.

serebbi
Автор

What a cool tutorial!
Thank you so much!
Like seriously

alexandereckert
Автор

Very cool project! I love low level stuff.

thisisnotok
Автор

This video is gem. Thank you for this nice video

vaibhavshinde
Автор

43:11 I enjoyed the keystrokes sound over your keyboard

ronen
Автор

38:00 I think the right solution for the console output would be "flush" function
fprintf(stdout, "message");
flush(stdout);
to force it printing the message.
stdout is bufferized.

nickodimcherepanov
Автор

Respect for doing the sometimes stressfull debugging on video.
Having a ok understanding of C++, C and networking, I think it is a great video.
Where do you get the sys/socket.h and netinet/in.h from?
Do these h files have the ping facility?

grimvian
Автор

I think the http standard expects "\r\n" for new lines

Brad_Script
Автор

Still on data structure on C, After that I am going straight into this. Thanks

solomonbestz
Автор

Thank you, Sir 🙏

EOMWS = Eric O Meehan Web Server 😁😉

tukangyou
Автор

A couple of things: 1. When declaring a const string you should make it an array, ie. not: 'char * hello = "something"' but 'char hello[] = "something"'. That makes it so you don't have to use strlen but sizeof, which is compile time. 2. Why are you putting the result connecting address of the client into the address of the server in accept?

adamlabus
Автор

the socket function returns a -1 if it gives an error

mostafaahmed
Автор

Content-Length is mandatory header, it should be kept

morritz
Автор

About printf("==== WAITING FOR CONNECTION ====") not works is because printf is LINE BUFFERED that means the printf needs '\n' or the program ends to sends the current buffer to processor to be shown in the screen, grettings from Ecuador :D. I love your channel.

sebastianguzman