This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Extremely hacky server program that will send a standard response | |
// to every client that connects, then closes the connection. Will | |
// issue no system calls (as measured by `strace`) after initial setup | |
// no matter how many requests are served. | |
// Yes, this program is sorely lacking in error checking. It's a toy | |
// and not meant to be taken seriously. | |
// compile with gcc no_syscall_server.c -luring |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings, DeriveGeneric, DerivingStrategies, DeriveAnyClass #-} | |
module Main where | |
import Prelude hiding (foldl) | |
import Conduit hiding (connect) | |
import Data.Attoparsec.ByteString as Attoparsec | |
import Data.Attoparsec.ByteString.Char8 | |
import qualified Data.ByteString as B | |
import Data.Aeson | |
import Data.Conduit.Attoparsec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Utils | |
import Control.Concurrent | |
import Control.Concurrent.Chan | |
import Data.List | |
import qualified Data.Map.Strict as M | |
import qualified Data.Set as S | |
import Data.Range as Range |
OlderNewer