Skip to content

Instantly share code, notes, and snippets.

View frehberg's full-sized avatar

Frank Rehberger frehberg

View GitHub Profile
@frehberg
frehberg / test_death_pipe.c
Last active December 28, 2019 21:50
C death pipe
#include <stdio.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdlib.h>
#include <poll.h>
#include <string.h>
#include <sys/wait.h>
#include <fcntl.h>
/**
@frehberg
frehberg / md
Created September 8, 2018 14:41
Rust wasm-pack on Ubuntu-18.04
# Rust wasm-pack on Ubuntu-18.04
If you follow the rust-wasm-book https://rustwasm.github.io/book/introduction.html you will run into problems executing the step `wasm-pack init`
on UBuntu-18.04 as the latest version of tool wasm-pack requires LLVM-7.
LLVM-7 is not shipped with Ubuntu-18.04 so far, it must be installed from third-party repository. For details see http://apt.llvm.org/
## LLVM-7 installaton steps
Add the following debian-repos of your package manager, for example using the tool `synaptic`
//! A chat server that broadcasts a message to all connections.
//!
//! This example is explicitly more verbose than it has to be. This is to
//! illustrate more concepts.
//!
//! A chat server for telnet clients. After a telnet client connects, the first
//! line should contain the client's name. After that, all lines send by a
//! client are broadcasted to all other connected clients.
//!
//! Because the client is telnet, lines are delimited by "\r\n".