Copyright | (c) 2017-2019 Jack Kelly |
---|---|
License | GPL-3.0-or-later |
Maintainer | jack@jackkelly.name |
Stability | experimental |
Portability | non-portable |
Safe Haskell | None |
Language | Haskell2010 |
FFI binding to libtelnet
. The vast majority of these functions are
generated from foreign import
declarations.
Synopsis
- telnetInit :: [TelnetTeloptT] -> TelnetEventHandlerT -> [Flag] -> IO (ForeignPtr TelnetT)
- cTelnetInit :: Ptr TelnetTeloptT -> FunPtr TelnetEventHandlerT -> CUChar -> Ptr () -> IO (Ptr TelnetT)
- cTelnetFree :: Ptr TelnetT -> IO ()
- type TelnetEventHandlerT = Ptr TelnetT -> Ptr EventT -> Ptr () -> IO ()
- wrapEventHandler :: TelnetEventHandlerT -> IO (FunPtr TelnetEventHandlerT)
- telnetRecv :: Ptr TelnetT -> ByteString -> IO ()
- cTelnetRecv :: Ptr TelnetT -> CString -> CSize -> IO ()
- cTelnetIac :: Ptr TelnetT -> Iac -> IO ()
- cTelnetNegotiate :: Ptr TelnetT -> Iac -> Option -> IO ()
- telnetSend :: Ptr TelnetT -> ByteString -> IO ()
- cTelnetSend :: Ptr TelnetT -> CString -> CSize -> IO ()
- telnetSubnegotiation :: Ptr TelnetT -> Option -> ByteString -> IO ()
- cTelnetSubnegotiation :: Ptr TelnetT -> Option -> CString -> CSize -> IO ()
- cTelnetBeginCompress2 :: Ptr TelnetT -> IO ()
- cTelnetBeginNewEnviron :: Ptr TelnetT -> ECmd -> IO ()
- cTelnetNewEnvironValue :: Ptr TelnetT -> EVar -> CString -> IO ()
- cTelnetTTypeSend :: Ptr TelnetT -> IO ()
- cTelnetTTypeIs :: Ptr TelnetT -> CString -> IO ()
- telnetSendZmp :: Ptr TelnetT -> [ByteString] -> IO ()
- cTelnetSendZmp :: Ptr TelnetT -> CSize -> Ptr CString -> IO ()
- useAsCStrings :: [ByteString] -> (Ptr CString -> IO a) -> IO a
Documentation
telnetInit :: [TelnetTeloptT] -> TelnetEventHandlerT -> [Flag] -> IO (ForeignPtr TelnetT) Source #
Wrap cTelnetInit
.
:: Ptr TelnetTeloptT | const telnet_telopt_t *telopts |
-> FunPtr TelnetEventHandlerT | telnet_event_handler_t eh |
-> CUChar | unsigned char flags |
-> Ptr () | void *user_data |
-> IO (Ptr TelnetT) |
C function telnet_init
.
type TelnetEventHandlerT = Ptr TelnetT -> Ptr EventT -> Ptr () -> IO () Source #
Represents telnet_event_handler_t
.
wrapEventHandler :: TelnetEventHandlerT -> IO (FunPtr TelnetEventHandlerT) Source #
Wrap an TelnetEventHandlerT
to pass to C code.
telnetRecv :: Ptr TelnetT -> ByteString -> IO () Source #
Wrap cTelnetRecv
.
C function telnet_recv
.
C function telnet_iac
.
C function telnet_negotiate
.
telnetSend :: Ptr TelnetT -> ByteString -> IO () Source #
Wrap cTelnetSend
.
C function telnet_send
.
telnetSubnegotiation :: Ptr TelnetT -> Option -> ByteString -> IO () Source #
Wrap cTelnetSubnegotiation
.
cTelnetSubnegotiation Source #
:: Ptr TelnetT | telnet_t *telnet |
-> Option | unsigned char telopt |
-> CString | const char *buffer |
-> CSize | size_t size |
-> IO () |
C function telnet_subnegotiation
.
cTelnetBeginCompress2 Source #
C function telnet_begin_compress2
.
cTelnetBeginNewEnviron Source #
C function telnet_begin_newenviron
.
cTelnetNewEnvironValue Source #
C function telnet_newenviron_value
.
C function telnet_ttype_is
.
telnetSendZmp :: Ptr TelnetT -> [ByteString] -> IO () Source #
Wrap cTelnetSendZmp
.
C function telnet_send_zmp
.
useAsCStrings :: [ByteString] -> (Ptr CString -> IO a) -> IO a Source #
Collect '[ByteString]' into a temporary array of strings in a 'Ptr CString', for passing to C functions.