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 BangPatterns #-} | |
{-# LANGUAGE CPP, ForeignFunctionInterface #-} | |
-- ghc --make -O2 -funbox-strict-fields -threaded -rtsopts SimpleServer.hs | |
import Network.Socket | |
import System.Environment (getArgs) | |
import Control.Monad | |
import Foreign | |
import Foreign.C.Types |
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
// compile with: gcc epoll-example-pipe.c | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <sys/epoll.h> | |
#define MAXEVENTS 64 | |
int | |
main (int argc, char *argv[]) |