The tiniest chat servers on earth!

Overview

yoctochat

The tiniest chat servers on earth!

Here will be a collection of the simplest possible TCP chat servers, to demonstrate how to write multiuser, multiplexing server software using various techniques.

The "spec"

A yoctochat server will:

  • take a single commandline argument, the port to listen on
  • open a listening port
  • handle multiple connections and disconnections on that port
  • receive text on a connection, and forward it on to all other connections
  • produce simple output about what its doing
  • demonstrate a single IO multiplexing technique as simply as possible
  • be well commented!

Why?

20+ years ago, during my University days, I started writing little chat servers like this to teach myself C, UNIX, systems programming, internet programming, and so on. I went on to write bigger and better ones. It has been useful knowledge!

Lately, I found myself wanting to experiment with io_uring, and I realised I'd forgotten how the "classic" select() loop is constructed. So I started there, and here we are!

Issues
  • Implement kqueue implementation

    Implement kqueue implementation

    Hello! I didn't write C for a while and decided to give it a go after reading your article. Please review, maybe it can be useful for someone too I tried to follow the original style as much as possible.

    opened by delneg 1
Owner
Rob N ★
@fastmailops and stupid toys
Rob N ★
A Google Chat protocol plugin for libpurple/Pidgin/bitlbee/whatever

Google Chat Plugin for libpurple A WORK IN PROGRESS replacement prpl for Google Chat in Pidgin/libpurple to support the proprietary protocol that Goog

Eion Robb 61 Jun 15, 2022
A cross-platform SDK enabling developers to integrate real-time chat technology into their projects

4Players ODIN SDK ODIN is a cross-platform software development kit (SDK) that enables developers to integrate real-time chat technology into multipla

4Players 4 Feb 20, 2022
server secure chat

nem server api Register Login GetList Handshake Message Feed StatusOnline HandshakeKey HandshakeNotice FileAdd StorageFile GetFile Register { "type":

Dmitrii 6 Apr 3, 2022
Simple local P2P chat on UDP sockets

Local P2P Chat This is a fully decentralized chat. To communicate, simply run it on computers in a single local network (using one port). All messages

Anton Khalitov 15 Apr 13, 2022
Simple Tcp Chat Client / Server written in C++

What this TcpXat TcpXat Is A Simple Tcp Chat Setup TcpXat sudo apt install make;make client;make serv;echo "done by FuryM3m0ry"; How To Run TcpXat Ter

sami 1 Dec 28, 2021
C library to create simple HTTP servers and Web Applications.

Onion http server library Travis status Coverity status Onion is a C library to create simple HTTP servers and Web Applications. master the developmen

David Moreno Montero 1.8k Jun 21, 2022
Async & Concurrent Servers implemented in C

Concurrent servers in c Imlementation of concurrent severs in c from scratch using this awesome blog as a tutorial. Project Structure . ├── readme.md

Rupanshu Yadav 7 Jun 21, 2021
STARTTLS implementation for mail servers that don't have it.

smtpd-starttls-proxy - a STARTTLS implementation for mail servers ----------------------------------------------------------------- smtpd-starttls-p

Laurent Bercot 6 Dec 21, 2021
Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration.

Husarnet Client Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration. Key fe

Husarnet 128 Jun 19, 2022
This repository to emulate the progression on World of Warcraft (AzerothCore) based servers, from the version 3.0 to 3.3.5a

WoltkProgression Author: Silker This repository contains all the files required to emulate the progression on World of Warcraft private servers runnin

Silker 16 Dec 28, 2021
Enabling services on your device 66 Jun 23, 2022
An implementation of the Mobile Adapter GB protocol, to connect to custom game servers.

libmobile Library that implements the Mobile Adapter GB protocol, in a way that should be easy to integrate into a plethora of different emulators/har

REON Team 8 May 11, 2022
StateAFL: A Greybox Fuzzer for Stateful Network Servers

StateAFL: A Coverage-Driven (Greybox) Fuzzer for Stateful Network Protocols StateAFL is a fuzzer designed for network servers. It extends the original

null 98 Jun 6, 2022
Provide translation, currency conversion, and voting services. First using telnet you create a connection to a TCP socket, then the server connects to 3 UDP sockets hosted on other servers to do tasks.

to run micro servers g++ translator.cpp -o translator ./translator <port 1> g++ voting.cpp -o voting ./voting <port 2> g++ currency_converter.cpp -o c

Jacob Artuso 1 Oct 29, 2021
Webdav-client-cpp - C++ WebDAV Client provides easy and convenient to work with WebDAV-servers.

WebDAV Client Package WebDAV Client provides easy and convenient to work with WebDAV-servers: Yandex.Disk Dropbox Google Drive Box 4shared ownCloud ..

Cloud Polis 100 Apr 13, 2022
✔️The smallest header-only GUI library(4 KLOC) for all platforms

Welcome to GUI-lite The smallest header-only GUI library (4 KLOC) for all platforms. 中文 Lightweight ✂️ Small: 4,000+ lines of C++ code, zero dependenc

null 6.3k Jun 27, 2022
A C++ commandline for use in servers and chat software. Provides very simple asynchronous input/output.

commandline A C++ commandline for use in servers and terminal chat software. Provides very simple asynchronous input/output. Supports reading and writ

Lion 68 Jun 14, 2022
Earth observation data cubes from GDAL image collections

gdalcubes - Earth observation data cubes from GDAL image collections gdalcubes is a library to represent collections of Earth Observation (EO) images

Marius Appel 69 Mar 9, 2022
You must create a small 2D game where a dolphin escapes earth after eating some fish. ✅‎‎‎‏‏‎ ‎

so_long Subject You must create a small 2D game where a dolphin escapes earth after eating some fish. Or any hero collects any valuables before leavin

esafar ~ c2h6 16 Jun 1, 2022
Mumble is an Open Source, low-latency, high quality voice chat software

Mumble is an Open Source, low-latency and high-quality voice-chat program written on top of Qt and Opus.

Mumble 4.8k Jun 18, 2022
Ncurses TCP Chat

NCURSES Encrypted TCP Chat This is an encrypted chat via the command line! It was done using ncurses to build the whole user interface. I wanted to do

Edgar Hernandez 57 Jun 14, 2022
Unlocks the chat in Among Us

Among us external chat unlocker Among us external chat unlocker written in c++ Build flags for gcc -O2 -s -static-libstdc++ -static-libgcc Download Yo

Viliyan Yordanov 38 May 30, 2022
A Google Chat protocol plugin for libpurple/Pidgin/bitlbee/whatever

Google Chat Plugin for libpurple A WORK IN PROGRESS replacement prpl for Google Chat in Pidgin/libpurple to support the proprietary protocol that Goog

Eion Robb 61 Jun 15, 2022
📃 Export WeChat chat histories to HTML files.

wechat-export Export WeChat chat histories to HTML files. Preview This script generates a HTML file for each contact's chat history. Currently it supp

Zihua Li 563 Jun 27, 2022
This is new projec based in apps to chat or messages people to people

Stranger This is new projec based in apps to chat or messages people to people Esta aplicacion tendra las siguientes caracteristicas: 1* Es 100% segur

Juan Duque 3 Nov 3, 2021
A cross-platform SDK enabling developers to integrate real-time chat technology into their projects

4Players ODIN SDK ODIN is a cross-platform software development kit (SDK) that enables developers to integrate real-time chat technology into multipla

4Players 4 Feb 20, 2022
server secure chat

nem server api Register Login GetList Handshake Message Feed StatusOnline HandshakeKey HandshakeNotice FileAdd StorageFile GetFile Register { "type":

Dmitrii 6 Apr 3, 2022
(bad) decentralized chat app

ircreborn what is this well. ircreborn was created because i felt that all the good platforms had too many paywalled features. (also because discord h

X 9 Apr 1, 2022
Simple local P2P chat on UDP sockets

Local P2P Chat This is a fully decentralized chat. To communicate, simply run it on computers in a single local network (using one port). All messages

Anton Khalitov 15 Apr 13, 2022