Safe Haskell | Safe-Inferred |
---|
A higher level wrapper around Network.Socket, since Network is deprecated.
Synopsis
- data Addr
- listenUnix :: IO.FilePath -> IO.IO Socket.Socket
- withHandle :: Addr -> (IO.Handle -> IO.IO a) -> IO.IO a
- withHandle_ :: Addr -> (IO.Handle -> IO.IO ()) -> IO.IO ()
- withConnection :: Addr -> (Socket.Socket -> IO.IO a) -> IO.IO a
- getHostName :: IO.IO String
Documentation
withHandle :: Addr -> (IO.Handle -> IO.IO a) -> IO.IO a Source #
Like withConnection
, but use a high level IO.Handle.
withHandle_ :: Addr -> (IO.Handle -> IO.IO ()) -> IO.IO () Source #
Like withHandle
except ignore a connection failure. Other
exceptions pass through.
withConnection :: Addr -> (Socket.Socket -> IO.IO a) -> IO.IO a Source #
Connect to the Addr and run the action with the socket.
getHostName :: IO.IO String Source #
getHostName from Network.BSD, which is deprecated.