linear-socket-0.3.3.3: Typed sockets

Safe HaskellNone
LanguageHaskell2010

Network.Typed.Socket

Documentation

data SocketFamily Source #

Constructors

Unix 
InetV4 
InetV6 

data SocketProtocol Source #

Constructors

Tcp 
Udp 

socket :: forall f p. (SockFam f, SockProto p) => IO (SSocket f p Unconnected Available) Source #

bind :: SockAddr f -> SSocket f p Unconnected sh -> IO (SSocket f p Bound sh) Source #

send :: CanSend sh ~ True => ByteString -> SSocket f Tcp Connected sh -> IO Int Source #

sendTo :: CanSend sh ~ True => ByteString -> SockAddr f -> SSocket f Udp Unconnected sh -> IO Int Source #

recv :: CanReceive sh ~ True => Int -> SSocket f Tcp Connected sh -> IO ByteString Source #

recvFrom :: (CanReceive sh ~ True, SockFam f) => Int -> SSocket f Udp Unconnected sh -> IO (ByteString, SockAddr f) Source #

close :: Closeable s ~ True => SSocket f p s sh -> IO (SSocket f p Closed sh) Source #

shutdownSend :: CanShutdownSend sh s ~ True => SSocket f p s sh -> IO (SSocket f p s (Shutdown sh ShutdownSend)) Source #

shutdownReceive :: CanShutdownReceive sh s ~ True => SSocket f p s sh -> IO (SSocket f p s (Shutdown sh ShutdownReceive)) Source #

shutdownBoth :: CanShutdownBoth sh s ~ True => SSocket f p s sh -> IO (SSocket f p s (Shutdown sh ShutdownBoth)) Source #

withSocket :: (SockFam f, SockProto p) => (SSocket f p Unconnected Available -> IO a) -> IO a Source #

setSocketOption :: SocketOption -> Int -> SSocket f p s sh -> IO (SSocket f p s sh) Source #

makePortReusable :: SSocket f p s sh -> IO (SSocket f p s sh) Source #

makeAddrReusable :: SSocket f p s sh -> IO (SSocket f p s sh) Source #