Skip to content

Instantly share code, notes, and snippets.

View vipulkmr02's full-sized avatar

Vipul Kumar Gupta vipulkmr02

View GitHub Profile
@vipulkmr02
vipulkmr02 / server.c
Created December 21, 2023 14:03
Minimalist C Web Server - not for production use, only for fun :)
#include <sys/socket.h>
#include <string.h>
#include <fcntl.h>
#include <sys/sendfile.h>
#include <unistd.h>
#include <netinet/in.h>
void main() {
int s = socket(AF_INET, SOCK_STREAM, 0);
struct sockaddr_in addr = {