Skip to content

Instantly share code, notes, and snippets.

import Network.Socket
import Control.Concurrent
import qualified System.IO as IO
type HandlerFunc = SockAddr -> String -> IO ()
serveLog :: String -- ^ Port number or name; 514 is default
-> HandlerFunc -- ^ Function to handle incoming messages
-> IO ()
serveLog port handlerfunc = withSocketsDo $
We couldn’t find that file to show.
We couldn’t find that file to show.