Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Util.Network

Description

A higher level wrapper around Network.Socket, since Network is deprecated.

Synopsis

Documentation

data Addr Source #

Instances

Instances details
Show Addr Source # 
Instance details

Defined in Util.Network

Methods

showsPrec :: Int -> Addr -> ShowS #

show :: Addr -> String #

showList :: [Addr] -> ShowS #

Eq Addr Source # 
Instance details

Defined in Util.Network

Methods

(==) :: Addr -> Addr -> Bool #

(/=) :: Addr -> Addr -> Bool #

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.