इस प्रोजेक्ट के बारे में

Keel (Kernel Event Engine, Lightweight) C में लिखा गया एक पोर्टेबल असिंक्रोनस नेटवर्किंग सब्सट्रेट है। इसका मूल विचार एक मॉडल-न्यूट्रल ट्रांसपोर्ट लेयर है: सेमांटिक stream, listener और datagram एब्स्ट्रैक्शन, जो या तो readiness या completion execution मॉडल द्वारा संचालित होते हैं, और एक socket seam पर बैठते हैं जो किसी ऑपरेटिंग सिस्टम को मान नहीं लेता। आर्किटेक्चर तीन ऑर्थोगोनल अक्षों पर संगठित है: - Event axis: readiness बैकएंड (epoll, kqueue, WSAPoll, poll) interest रजिस्टर करते हैं और EAGAIN पर पुनः प्रयास करते हैं; completion बैकएंड (io_uring, IOCP) owned operations सबमिट करते हैं और completions प्राप्त करते हैं। दोनों एक छोटे event-loop इंटरफ़ेस के पीछे बैठते हैं, और प्रत्येक अपनी native semantics बनाए रखता है, दूसरे की नकल नहीं करता। - Socket axis: एक pluggable provider vtable (KlSocketProvider) जिसमें POSIX और Winsock अंतर्निहित हैं, साथ ही lwIP (BSD socket layer और एक raw NO_SYS callback stack) और एक freestanding UEFI EFI_TCP4/UDP4 provider के लिए शिप किए गए इंटीग्रेशन। Capability flags native fd, writev और sendfile जैसी सुविधाओं को नियंत्रित करते हैं। - Protocol axis: HTTP/1.1, HTTP/2, WebSocket, SSE और एक async DNS resolver सब्सट्रेट के उपभोक्ता हैं, इसका उद्देश्य नहीं। Protocol कोड का उद्देश्य केवल connection/stream और event एब्स्ट्रैक्शन के माध्यम से जाना है, कभी सीधे किसी platform networking header या event engine तक नहीं; प्रोजेक्ट default-deny structural build gates का वर्णन करता है जो इस पृथक्करण के उल्लंघन पर विफल हो जाते हैं। Protocol और server सुविधाओं में शामिल हैं: एक pluggable HTTP parser (llhttp vendored), vtable के माध्यम से pluggable TLS, pluggable body readers, short-circuiting के साथ per-route middleware, अंतर्निहित CORS middleware, RFC 2046 multipart form-data, तीन response मोड (buffered writev, sendfile, chunked streaming), बिना allocation के route parameter capture, स्वचालित 408 प्रतिक्रियाओं के साथ connection timeouts, access logging, async server handlers जो connections को suspend और resume करते हैं, sync और async HTTP clients, pipe wakeup के साथ एक thread pool, generic fd watchers, SSE framing, response compression (miniz gzip) और client decompression, एक keep-alive connection pool, redirect following, HTTP proxy और CONNECT tunneling, एक backpressure write buffer, timer scheduling, और sqlite3-style error codes। Networking अतिरिक्त सुविधाओं में शामिल हैं: peer credentials के साथ UNIX domain socket servers, peer security labels, mTLS client certificate inspection, trusted CIDRs द्वारा नियंत्रित PROXY protocol support, inherited fds के माध्यम से socket activation (systemd LISTEN_FDS), IOCP पर Windows named pipes, batching के साथ एक स्थिर fixed-slot UDP datagram API, multicast/broadcast, ECN/TOS marking और offload support, एक pluggable async DNS resolver जिसमें अंतर्निहित dual-family implementation है, और Happy Eyeballs client connection racing। Build विकल्पों में epoll, kqueue, io_uring, poll और IOCP बैकएंड, Cosmopolitan C, native MSVC, और optimization flags के लिए embedder hooks शामिल हैं। README एकल थ्रेड पर 111K req/s और दोनों execution मॉडलों पर ASan/UBSan के तहत परीक्षण बताता है, साथ में एक vendored dependency (llhttp)।