Skip to content

Instantly share code, notes, and snippets.

@uduki
Created March 6, 2013 13:07
Show Gist options
  • Save uduki/5099188 to your computer and use it in GitHub Desktop.
Save uduki/5099188 to your computer and use it in GitHub Desktop.
echo server (network-conduit)
{-# LANGUAGE OverloadedStrings #-}
import Data.Conduit
import Data.Conduit.Network
main :: IO ()
main = runTCPServer (serverSettings 3001 "127.0.0.1") echo
echo :: Application IO
echo app = appSource app $$ appSink app
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment