Simple socket programming with Haskell

code,university 15 October 2008 | 3 Comments

Here is a simple program showing socket programming with Haskell, created for a University assignment. It allows half-duplex (one way at a time) communication between two (or fewer ) computers: import Network import Data.Char (toLower) import Text.Regex.Posix ((=~)) import System.IO (hGetLine,hClose,hPutStrLn,hSetBuffering,BufferMode(..),Handle,stdout)   port = 8001 — a nice port number   main = withSocketsDo $ [...]

Tagged in , , ,