Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
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.