hans-3.0.2: Network Stack

Safe HaskellNone
LanguageHaskell2010

Hans.Socket.Handle

Contents

Synopsis

Documentation

makeHansHandle :: (Socket sock, DataSocket sock, Network addr, Typeable sock) => sock addr -> IOMode -> IO Handle Source #

Make a GHC Handle from a Hans handle.

Orphan instances

(Socket sock, DataSocket sock, Network addr) => BufferedIO (sock addr) Source # 

Methods

newBuffer :: sock addr -> BufferState -> IO (Buffer Word8) #

fillReadBuffer :: sock addr -> Buffer Word8 -> IO (Int, Buffer Word8) #

fillReadBuffer0 :: sock addr -> Buffer Word8 -> IO (Maybe Int, Buffer Word8) #

emptyWriteBuffer :: sock addr -> Buffer Word8 -> IO (Buffer Word8) #

flushWriteBuffer :: sock addr -> Buffer Word8 -> IO (Buffer Word8) #

flushWriteBuffer0 :: sock addr -> Buffer Word8 -> IO (Int, Buffer Word8) #

(Socket sock, DataSocket sock, Network addr) => RawIO (sock addr) Source # 

Methods

read :: sock addr -> Ptr Word8 -> Int -> IO Int #

readNonBlocking :: sock addr -> Ptr Word8 -> Int -> IO (Maybe Int) #

write :: sock addr -> Ptr Word8 -> Int -> IO () #

writeNonBlocking :: sock addr -> Ptr Word8 -> Int -> IO Int #

(Socket sock, DataSocket sock, Network addr) => IODevice (sock addr) Source # 

Methods

ready :: sock addr -> Bool -> Int -> IO Bool #

close :: sock addr -> IO () #

isTerminal :: sock addr -> IO Bool #

isSeekable :: sock addr -> IO Bool #

seek :: sock addr -> SeekMode -> Integer -> IO () #

tell :: sock addr -> IO Integer #

getSize :: sock addr -> IO Integer #

setSize :: sock addr -> Integer -> IO () #

setEcho :: sock addr -> Bool -> IO () #

getEcho :: sock addr -> IO Bool #

setRaw :: sock addr -> Bool -> IO () #

devType :: sock addr -> IO IODeviceType #

dup :: sock addr -> IO (sock addr) #

dup2 :: sock addr -> sock addr -> IO (sock addr) #