Skip to content

Instantly share code, notes, and snippets.

View arnetheduck's full-sized avatar

Jacek Sieka arnetheduck

View GitHub Profile
@arnetheduck
arnetheduck / accept.c
Created December 5, 2025 14:23
Single socket, multiple threads
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <pthread.h>
#include <netdb.h>